From 3bb48a9c945dbafbbc912ef8d65234d88cb65794 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Sat, 24 Oct 2020 22:29:54 +0200 Subject: setup2hd fixes and enhancements DAW configuration is now properly copied Extracting the Live OS to hard disk is roughly 10 times faster now, after abandoning the fancy progress bar and just showing the rsync status. Use an enhanced Slackware SeTpasswd to add a non-root user and set the root password. Various syntax and logic errors removed. --- setup2hd/SeTuacct.tpl | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'setup2hd/SeTuacct.tpl') diff --git a/setup2hd/SeTuacct.tpl b/setup2hd/SeTuacct.tpl index 5024f5d..e07564f 100644 --- a/setup2hd/SeTuacct.tpl +++ b/setup2hd/SeTuacct.tpl @@ -1,21 +1,21 @@ #!/bin/sh -#TMP=/var/log/setup/tmp -TMP=/tmp +TMP=/var/log/setup/tmp if [ ! -d $TMP ]; then mkdir -p $TMP fi +T_PX="$(cat $TMP/SeTT_PX)" freeuid() { # Get the first free UIDNumber after 999: - local UIDS=$( cat ${T_PX}/etc/passwd | cut -d: -f3 | sort -n ) - local UID=999 + local LUIDS=$( cat ${T_PX}/etc/passwd | cut -d: -f3 | sort -n ) + local LUID=999 while true; do - UID=$(( $UID + 1)) - if ! echo $UIDS | grep -F -q -w "$UID"; then + LUID=$(( $LUID + 1)) + if ! echo $LUIDS | grep -F -q -w "$LUID"; then break; fi done - echo $UID + echo $LUID } FREEUID="$(freeuid)" @@ -33,14 +33,14 @@ while [ 0 ]; do "Logonname:" 2 1 "$UACCOUNT" 2 14 32 0 \ "UIDNumber:" 3 1 "$UACCTNR" 3 14 12 0 \ "Login Shell:" 4 1 "$USHELL" 4 14 12 0 \ - 2>&1 1> $TMP/tempresult + 2>&1 1> $TMP/tempuacct iii=0 declare -a USERATTR while read LINE ; do USERATTR[$iii]="$LINE" iii=$(expr $iii + 1) - done < $TMP/tempresult - rm -f $TMP/tempresult + done < $TMP/tempuacct + rm -f $TMP/tempuacct UFULLNAME="${USERATTR[0]}" UACCOUNT="${USERATTR[1]}" UACCTNR="${USERATTR[2]}" -- cgit v1.2.3-65-gdbad