projects
/
grml-autoconfig.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
save-config: Adjust for working with current Grml versions [Testing: issue1188]
[grml-autoconfig.git]
/
autoconfig.functions
diff --git
a/autoconfig.functions
b/autoconfig.functions
index
8eba860
..
441411f
100755
(executable)
--- a/
autoconfig.functions
+++ b/
autoconfig.functions
@@
-372,20
+372,20
@@
config_language(){
# {{{ Set hostname
config_hostname(){
# {{{ Set hostname
config_hostname(){
- if checkbootparam 'hostname' ; then
+ if ! checkbootparam 'hostname' ; then
+ return 0
+ fi
+
HOSTNAME="$(getbootparam 'hostname' 2>>$DEBUG)"
if [ -z "$HOSTNAME" ] && [ -x /usr/bin/random-hostname ] ; then
HOSTNAME="$(getbootparam 'hostname' 2>>$DEBUG)"
if [ -z "$HOSTNAME" ] && [ -x /usr/bin/random-hostname ] ; then
-
einfo "Generating random hostname as no hostname was specified."
-
HOSTNAME="$(/usr/bin/random-hostname)"
-
eend $?
+ einfo "Generating random hostname as no hostname was specified."
+ HOSTNAME="$(/usr/bin/random-hostname)"
+ eend $?
fi
fi
+
einfo "Setting hostname to $HOSTNAME as requested."
einfo "Setting hostname to $HOSTNAME as requested."
- grml-hostname $HOSTNAME >>$DEBUG ; RC=$?
- [ "$RC" = "0" ] && hostname $HOSTNAME
- eend $RC
- else
- hostname --file /etc/hostname
- fi
+ grml-hostname $HOSTNAME >>$DEBUG
+ eend $?
}
# }}}
}
# }}}
@@
-2197,4
+2197,4
@@
fi
# }}}
## END OF FILE #################################################################
# }}}
## END OF FILE #################################################################
-# vim:foldmethod=marker expandtab ai ft=zsh shiftwidth=
3
+# vim:foldmethod=marker expandtab ai ft=zsh shiftwidth=
2