X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage2%2Fpost-install;h=22435ae8cf22a8145e50c5dbadb012c63a3038f2;hb=48619411231621a6b9289bbbad75c5fa7f91dcfe;hp=3e65624d7c02fe49d5702e4d11905c31c0445bfe;hpb=b5bfb2006502b57fab234345a2393fd04e6d55ad;p=hvlinux.git diff --git a/stage2/post-install b/stage2/post-install index 3e65624..22435ae 100755 --- a/stage2/post-install +++ b/stage2/post-install @@ -1,10 +1,6 @@ #!/bin/bash -set -o errexit -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list +source ../functions/main cat > /etc/default/useradd << "EOF" # useradd defaults file @@ -19,7 +15,7 @@ EOF chmod -v 644 /etc/default/useradd if [ -n "${REGUSER}" ]; then - hv_useradd -g users -G audio,video,usb -s /bin/bash -m ${REGUSER} + hv_useradd -g users -G audio,video,usb,shutdown -s /bin/bash -m ${REGUSER} fi echo "Copying /etc/skel files to root directory" @@ -32,4 +28,20 @@ chown -v root:root /tmp chown -v root:root /var chown -v root:root /var/log +# Removing /tools from PATH: +SED_REP='/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin' +sed -i -e "s!^\(PATH=\).*tools.*!\1${SED_REP}!" /etc/profile + +# Removing /tools directory +if [ -d /tools ]; then + DEST=/usr/src/tools + if [ -d ${DEST} ]; then + # Remove old backup + rm -rf ${DEST} + fi + mv /tools ${DEST} +fi + +ldconfig + exit $?