summaryrefslogtreecommitdiffstats
path: root/setup2hd/SeTuacct.tpl
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2020-10-24 22:29:54 +0200
committer Eric Hameleers <alien@slackware.com>2020-10-24 22:29:54 +0200
commit3bb48a9c945dbafbbc912ef8d65234d88cb65794 (patch)
tree63ce1d983031b5a8bb8371bc690c689acac39ed4 /setup2hd/SeTuacct.tpl
parent2e29bd396c899fdf2e99504c37c993d4576b8244 (diff)
downloadliveslak-3bb48a9c945dbafbbc912ef8d65234d88cb65794.tar.gz
liveslak-3bb48a9c945dbafbbc912ef8d65234d88cb65794.tar.xz
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.
Diffstat (limited to '')
-rw-r--r--setup2hd/SeTuacct.tpl20
1 files changed, 10 insertions, 10 deletions
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]}"