]> arthur.barton.de Git - ConfigScripts.git/blobdiff - install.sh
Update shell history handling
[ConfigScripts.git] / install.sh
index b150112790beb473735df663f490781bc9feedab..1e12077dd66b838e670e6a1ea94bdf0891e18444 100755 (executable)
@@ -84,6 +84,23 @@ Config_User() {
        fi
 }
 
+Config_Skel() {
+       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
+                       Copy_File user/bash_profile /etc/skel/.profile root 644
+               else
+                       Copy_File user/bash_profile /etc/skel/.bash_profile root 644
+               fi
+               Copy_File user/bashrc /etc/skel/.bashrc root 644
+       else
+               [ -z "$I_local" ] \
+                       && Msg "Can't write to \"/etc/skel\" - configuration SKIPPED.\n" \
+                       || Msg "Local install selected, \"/etc/skel\" configuration SKIPPED.\n"
+       fi
+}
+
 Config_RootUser() {
        if [ "$UID" = "0" ]; then
                user=`grep "^.*:.*:0:" /etc/passwd | head -n 1 | cut -d':' -f1`
@@ -112,6 +129,7 @@ Msg "Running $NAME (uid=$UID) ...\n"
 
 user=`basename "$HOME"`
 
+Config_Skel
 Config_System
 Config_User "$user" "$HOME"
 Config_RootUser