- Copy_File sys/profile /etc/profile root 644
-else
- echo "Not running with root privileges - system configuration SKIPPED."
-fi
+}
+
+Config_Skel() {
+ if [ -w /etc/skel -a -z "$I_local" ]; then
+ Msg "Starting \"/etc/skel\" configuration:\n"
+ Msg " - bash shell:\n"
+ Copy_File user/bash_logout /etc/skel/.bash_logout root:0 644
+ if [ -e /etc/skel/.profile ]; then
+ Copy_File user/bash_profile /etc/skel/.profile root:0 644
+ else
+ Copy_File user/bash_profile /etc/skel/.bash_profile root:0 644
+ fi
+ Copy_File user/bashrc /etc/skel/.bashrc root:0 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
+}
+
+while [ $# -gt 0 ]; do
+ case "$1" in
+ "--local"|"-l")
+ export I_local=1; ;;
+ *)
+ echo "Usage: $0 [--local|-l]"
+ exit 1
+ esac
+ shift
+done
+
+[ -n "$UID" ] || UID=`id -r -u`
+[ -n "$EUID" ] || EUID=`id -u`
+export UID EUID
+
+Msg "Running $NAME (uid=$UID; euid=$EUID) ...\n"