X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage2%2Fpost-install;h=5da1992f8a7df5b3fbaac4aa15738878ed5eab67;hb=1b3f334af67c84997f7b5e6dee56faf556f0ea4b;hp=f0f33e01a97afbd253a2dd9f26e29b4e15e7226d;hpb=2a71f1dd83720c7648a846742a09b3b60b69c321;p=hvlinux.git diff --git a/stage2/post-install b/stage2/post-install index f0f33e0..5da1992 100755 --- a/stage2/post-install +++ b/stage2/post-install @@ -1,9 +1,6 @@ #!/bin/bash -# 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 @@ -17,12 +14,8 @@ EOF chmod -v 644 /etc/default/useradd -if [ -n "${REGUSER}" ]; then - hv_useradd -g users -G audio,video,usb -s /bin/bash -m ${REGUSER} -fi - echo "Copying /etc/skel files to root directory" -# Copy skel files to root directory. First create a copy to change owner +# First create a copy to change owner cp -au /etc/skel/.??* /root # Fixing ownership of directories /tmp and /var/log (may have been created by @@ -37,7 +30,12 @@ sed -i -e "s!^\(PATH=\).*tools.*!\1${SED_REP}!" /etc/profile # Removing /tools directory if [ -d /tools ]; then - mv /tools /tools.to.remove.after.stage2 + DEST=/usr/src/tools + if [ -d ${DEST} ]; then + # Remove old backup + rm -rf ${DEST} + fi + mv /tools ${DEST} fi ldconfig