diff options
Diffstat (limited to 'linhes/linhes-dev/LinHES9_iso/build_iso.sh')
-rwxr-xr-x | linhes/linhes-dev/LinHES9_iso/build_iso.sh | 69 |
1 files changed, 44 insertions, 25 deletions
diff --git a/linhes/linhes-dev/LinHES9_iso/build_iso.sh b/linhes/linhes-dev/LinHES9_iso/build_iso.sh index 51aba98..8399fb4 100755 --- a/linhes/linhes-dev/LinHES9_iso/build_iso.sh +++ b/linhes/linhes-dev/LinHES9_iso/build_iso.sh @@ -55,9 +55,9 @@ trap 's=$?; echo "$0: Error on line "$LINENO": $BASH_COMMAND"; exit $s' ERR # Clean up working directories cleanup () { -[[ -d ./arch_skel ]] && rm -r ./arch_skel -[[ -d ./work ]] && rm -r ./work -sleep 2 + [[ -d ./arch_skel ]] && rm -r ./arch_skel + [[ -d ./work ]] && rm -r ./work + sleep 2 } # Requirements and preparation @@ -102,38 +102,37 @@ prereqs() { # Copy Arch profile to working directory cp_releng () { -cp -r /usr/share/archiso/configs/releng/ ./arch_skel -rm -r ./arch_skel/efiboot -rm -r ./arch_skel/syslinux + cp -r /usr/share/archiso/configs/releng/ ./arch_skel + rm -r ./arch_skel/efiboot + rm -r ./arch_skel/syslinux } # Copy cust_repo to opt cp_repo () { -if [ -d "./cust_repo" ] -then + if [ -d "./cust_repo" ] + then cp -r ./cust_repo /opt/repo -fi + fi } # Remove ezrepo from opt rm_repo () { -if [ -d "/opt/repo" ] -then + if [ -d "/opt/repo" ] + then rm -r /opt/repo -fi + fi } # Delete automatic login nalogin () { -rm -r ./arch_skel/airootfs/etc/systemd/system/getty@tty1.service.d + rm -r ./arch_skel/airootfs/etc/systemd/system/getty@tty1.service.d } -# Remove cloud-init, hyper-v, qemu-guest, vmtoolsd, sshd, systemd-networkd & iwd services +# Remove cloud-init, hyper-v, vmtoolsd, sshd, systemd-networkd & iwd services rmunitsd () { rm ./arch_skel/airootfs/etc/systemd/system/multi-user.target.wants/hv_fcopy_daemon.service rm ./arch_skel/airootfs/etc/systemd/system/multi-user.target.wants/hv_kvp_daemon.service rm ./arch_skel/airootfs/etc/systemd/system/multi-user.target.wants/hv_vss_daemon.service -rm ./arch_skel/airootfs/etc/systemd/system/multi-user.target.wants/qemu-guest-agent.service rm ./arch_skel/airootfs/etc/systemd/system/multi-user.target.wants/vmtoolsd.service rm ./arch_skel/airootfs/etc/systemd/system/multi-user.target.wants/vmware-vmblock-fuse.service rm ./arch_skel/airootfs/etc/systemd/system/multi-user.target.wants/sshd.service @@ -163,7 +162,8 @@ ln -sf /usr/lib/systemd/system/cups.service ./arch_skel/airootfs/etc/systemd/sys ln -sf /usr/lib/systemd/system/cups.socket ./arch_skel/airootfs/etc/systemd/system/sockets.target.wants/cups.socket ln -sf /usr/lib/systemd/system/cups.path ./arch_skel/airootfs/etc/systemd/system/multi-user.target.wants/cups.path ln -sf /usr/lib/systemd/system/bluetooth.service ./arch_skel/airootfs/etc/systemd/system/dbus-org.bluez.service -ln -sf /usr/lib/systemd/system/lightdm.service ./arch_skel/airootfs/etc/systemd/system/display-manager.service +ln -sf /usr/lib/systemd/system/sddm.service ./arch_skel/airootfs/etc/systemd/system/display-manager.service +ln -sf /usr/lib/systemd/system/locale-gen.service ./arch_skel/airootfs/etc/systemd/system/multi-user.target.wants/locale-gen.service } # Copy files to customize the ISO @@ -179,7 +179,7 @@ cp -r ./cust_skel/airootfs ./arch_skel/ # Set hostname sethostname () { -echo "${MYHOSTNM}" > ./arch_skel/airootfs/etc/hostname + echo "${MYHOSTNM}" > ./arch_skel/airootfs/etc/hostname } # Create passwd file @@ -201,14 +201,16 @@ network:x:90:"${MYUSERNM}" floppy:x:94:"${MYUSERNM}" scanner:x:96:"${MYUSERNM}" power:x:98:"${MYUSERNM}" -rfkill:x:850:"${MYUSERNM}" -users:x:985:"${MYUSERNM}" -video:x:860:"${MYUSERNM}" -storage:x:870:"${MYUSERNM}" -optical:x:880:"${MYUSERNM}" -lp:x:840:"${MYUSERNM}" -audio:x:890:"${MYUSERNM}" +uucp:x:810:"${MYUSERNM}" +audio:x:820:"${MYUSERNM}" +lp:x:830:"${MYUSERNM}" +rfkill:x:840:"${MYUSERNM}" +video:x:850:"${MYUSERNM}" +storage:x:860:"${MYUSERNM}" +optical:x:870:"${MYUSERNM}" +sambashare:x:880:"${MYUSERNM}" autologin:x:965:"${MYUSERNM}" +users:x:985:"${MYUSERNM}" "${MYUSERNM}":x:1000:" > ./arch_skel/airootfs/etc/group } @@ -223,6 +225,22 @@ echo "root:"${root_hash}":14871:::::: # create gshadow file crtgshadow () { echo "root:!*::root +sys:!*::"${MYUSERNM}" +adm:!*::"${MYUSERNM}" +wheel:!*::"${MYUSERNM}" +log:!*::"${MYUSERNM}" +network:!*::"${MYUSERNM}" +floppy:!*::"${MYUSERNM}" +scanner:!*::"${MYUSERNM}" +power:!*::"${MYUSERNM}" +uucp:!*::"${MYUSERNM}" +audio:!*::"${MYUSERNM}" +lp:!*::"${MYUSERNM}" +rfkill:!*::"${MYUSERNM}" +video:!*::"${MYUSERNM}" +storage:!*::"${MYUSERNM}" +optical:!*::"${MYUSERNM}" +sambashare:!*::"${MYUSERNM}" "${MYUSERNM}":!*::" > ./arch_skel/airootfs/etc/gshadow } @@ -244,8 +262,9 @@ EndSection" > ./arch_skel/airootfs/etc/X11/xorg.conf.d/00-keyboard.conf # Fix 40-locale-gen.hook and create locale.conf crtlocalec () { -sed -i "s/en_US/"${LCLST}"/g" ./arch_skel/airootfs/etc/pacman.d/hooks/40-locale-gen.hook +#sed -i "s/en_US/"${LCLST}"/g" ./arch_skel/airootfs/etc/pacman.d/hooks/40-locale-gen.hook echo "LANG="${LCLST}".UTF-8" > ./arch_skel/airootfs/etc/locale.conf +echo ""${LCLST}".UTF-8 UTF-8" > ./arch_skel/airootfs/etc/locale.gen } # Start mkarchiso |