]> arthur.barton.de Git - ConfigScripts.git/commitdiff
install.sh: Don't do "skel" installation when called with "--local"
authorAlexander Barton <alex@barton.de>
Tue, 25 Dec 2012 21:26:02 +0000 (22:26 +0100)
committerAlexander Barton <alex@barton.de>
Tue, 25 Dec 2012 21:26:02 +0000 (22:26 +0100)
install.sh

index 877058beb19d507b8763729c5063d86afbcb9a23..1e12077dd66b838e670e6a1ea94bdf0891e18444 100755 (executable)
@@ -85,7 +85,7 @@ Config_User() {
 }
 
 Config_Skel() {
-       if [ -w /etc/skel ]; then
+       if [ -w /etc/skel -a -z "$I_local" ]; then
                Msg "Starting \"/etc/skel\" configuration:\n"
                Copy_File user/bash_logout /etc/skel/.bash_logout
                if [ -e /etc/skel/.profile ]; then
@@ -95,7 +95,9 @@ Config_Skel() {
                fi
                Copy_File user/bashrc /etc/skel/.bashrc root 644
        else
-               Msg "Can't write to \"/etc/skel\" - configuration SKIPPED.\n"
+               [ -z "$I_local" ] \
+                       && Msg "Can't write to \"/etc/skel\" - configuration SKIPPED.\n" \
+                       || Msg "Local install selected, \"/etc/skel\" configuration SKIPPED.\n"
        fi
 }
 
@@ -127,8 +129,8 @@ Msg "Running $NAME (uid=$UID) ...\n"
 
 user=`basename "$HOME"`
 
-Config_System
 Config_Skel
+Config_System
 Config_User "$user" "$HOME"
 Config_RootUser