diff options
author | Eric Hameleers <alien@slackware.com> | 2023-05-30 10:59:49 +0200 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2023-05-30 10:59:49 +0200 |
commit | f9fbf9143a99edf18364e68cde682e440c84f861 (patch) | |
tree | fc1fbe1da8af1c2f2f26ca24d39aa6e30262780c | |
parent | 268d770edef94e750bf3ab2b3bec13ca6ab07171 (diff) | |
download | liveslak-f9fbf9143a99edf18364e68cde682e440c84f861.tar.gz liveslak-f9fbf9143a99edf18364e68cde682e440c84f861.tar.xz |
liveinit: don't use switch unsupported by busybox cut command
Thanks to Richard Hoyle for pointing this out.
Diffstat (limited to '')
-rw-r--r-- | liveinit.tpl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/liveinit.tpl b/liveinit.tpl index f01250f..5d34592 100644 --- a/liveinit.tpl +++ b/liveinit.tpl @@ -195,7 +195,7 @@ for ARG in $(cat /proc/cmdline); do # generic syntax: hostname=newname[,qualifier] LIVE_HOSTNAME=$(echo $ARG | cut -f2 -d= | cut -f1 -d,) # Allow for the user to (mistakenly) add a domain component: - if [ $(echo $LIVE_HOSTNAME |cut -d. -f1- --output-delimiter ' '|wc -w) -gt 1 ]; then + if [ -n "$(echo "$LIVE_HOSTNAME". |cut -d. -f2-)" ]; then LIVE_DOMAIN=$(echo $LIVE_HOSTNAME |cut -d. -f2-) LIVE_HOSTNAME=$(echo $LIVE_HOSTNAME |cut -d. -f1) fi |