mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
config/path: add scrips to add user and groups
This commit is contained in:
parent
2cf34cc230
commit
e6a74e4809
18
config/path
18
config/path
@ -218,6 +218,24 @@ xorg_drv_configure_prepend() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
add_user() {
|
||||||
|
# Usage: add_user "username" "password" "userid" "groupid" "description" "home" "shell"
|
||||||
|
mkdir -p ${INSTALL}/etc
|
||||||
|
touch ${INSTALL}/etc/passwd
|
||||||
|
if [ -z "`grep "$1:" ${INSTALL}/etc/passwd`" ]; then
|
||||||
|
echo "$1:$2:$3:$4:$5:$6:$7" >> ${INSTALL}/etc/passwd
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
add_group() {
|
||||||
|
# Usage: add_group "groupname" "groupid"
|
||||||
|
mkdir -p ${INSTALL}/etc
|
||||||
|
touch ${INSTALL}/etc/group
|
||||||
|
if [ -z "`grep "$1:" ${INSTALL}/etc/group`" ]; then
|
||||||
|
echo "$1:x:$2:" >> ${INSTALL}/etc/group
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
INCLUDED_LANGS="en $MENU_LANG $INCLUDED_LANGS"
|
INCLUDED_LANGS="en $MENU_LANG $INCLUDED_LANGS"
|
||||||
|
|
||||||
# read personal options if available
|
# read personal options if available
|
||||||
|
Loading…
x
Reference in New Issue
Block a user