X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage2%2Fcis-post-install;h=3e65624d7c02fe49d5702e4d11905c31c0445bfe;hb=d9a5344c1aa683d051d1a1d5e87f0bba317e299a;hp=39f59c2f42358964cd4b58b87305d5b3e279a835;hpb=16cc35ba4890382ee9368a176e4f5a7fa773b7a6;p=hvlinux.git diff --git a/stage2/cis-post-install b/stage2/cis-post-install index 39f59c2..3e65624 100755 --- a/stage2/cis-post-install +++ b/stage2/cis-post-install @@ -1,11 +1,12 @@ -#!/bin/sh +#!/bin/bash +set -o errexit # Reading system configuration informations, functions and package versions. source ../sysinfos source ../functions source ../packages-list -cat > /etc/default/useradd << "EOF" && +cat > /etc/default/useradd << "EOF" # useradd defaults file HOME=/home INACTIVE=-1 @@ -15,20 +16,20 @@ SKEL=/etc/skel CREATE_MAIL_SPOOL=yes EOF -chmod -v 644 /etc/default/useradd && +chmod -v 644 /etc/default/useradd if [ -n "${REGUSER}" ]; then - hv_useradd -g users -G audio,video,usb -s /bin/bash -m ${REGUSER} || exit 1 -fi && + hv_useradd -g users -G audio,video,usb -s /bin/bash -m ${REGUSER} +fi -echo "Copying /etc/skel files to root directory" && +echo "Copying /etc/skel files to root directory" # Copy skel files to root directory. First create a copy to change owner -cp -au /etc/skel/.??* /root && +cp -au /etc/skel/.??* /root # Fixing ownership of directories /tmp and /var/log (may have been created by # a regular user when fetching packages). -chown -v root:root /tmp && -chown -v root:root /var && +chown -v root:root /tmp +chown -v root:root /var chown -v root:root /var/log exit $?