Add initial support for option -C
[grml-live.git] / etc / grml / fai / config / scripts / GRMLBASE / 21-usersetup
index 13d47e2..3214511 100755 (executable)
@@ -11,7 +11,8 @@ set -u
 set -e
 
 USERNAME=''
-[ -r /etc/grml/grml-live.conf ] && . /etc/grml/grml-live.conf
+[ -r /etc/grml/grml-live.conf ]  && . /etc/grml/grml-live.conf
+[ -r /etc/grml/grml-live.local ] && . /etc/grml/grml-live.local
 [ -n "$USERNAME" ] || USERNAME=grml
 
 if grep -q "$USERNAME:x:1000" $target/etc/group ; then
@@ -39,7 +40,7 @@ fi
 add_user_to_group() {
    [ -n "$1" ] || return 1
    if grep -q $1 $target/etc/group ; then
-      grep "$1:x:.*$USERNAME" $target/etc/group || addgroup $1 $USERNAME
+      grep "$1:x:.*$USERNAME" $target/etc/group || $ROOTCMD addgroup $USERNAME $1
    fi
 }