config/path: add scrips to add user and groups

This commit is contained in:
Stephan Raue 2009-09-21 01:21:25 +02:00
parent 2cf34cc230
commit e6a74e4809

View File

@ -218,6 +218,24 @@ xorg_drv_configure_prepend() {
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"
# read personal options if available