projects
/
grml-autoconfig.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update changelog
[grml-autoconfig.git]
/
autoconfig.functions
diff --git
a/autoconfig.functions
b/autoconfig.functions
index
97d45cd
..
7f8bc9d
100755
(executable)
--- a/
autoconfig.functions
+++ b/
autoconfig.functions
@@
-356,6
+356,11
@@
config_language(){
config_hostname(){
if checkbootparam 'hostname' ; then
HOSTNAME="$(getbootparam 'hostname' 2>>$DEBUG)"
config_hostname(){
if checkbootparam '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 $?
+ fi
einfo "Setting hostname to $HOSTNAME as requested."
grml-hostname $HOSTNAME >>$DEBUG ; RC=$?
[ "$RC" = "0" ] && hostname $HOSTNAME
einfo "Setting hostname to $HOSTNAME as requested."
grml-hostname $HOSTNAME >>$DEBUG ; RC=$?
[ "$RC" = "0" ] && hostname $HOSTNAME
@@
-1832,7
+1837,7
@@
config_netscript() {
if get_remote_file ${CONFIG} ${SCRIPTFILE} ; then
chmod +x ${SCRIPTFILE}
if get_remote_file ${CONFIG} ${SCRIPTFILE} ; then
chmod +x ${SCRIPTFILE}
- einfo "Running ${WHITE}${SCRIPTFILE}${NORMAL}:" && ${SCRIPTFILE} ; eend $?
+ einfo "Running ${WHITE}${SCRIPTFILE}${NORMAL}:" &&
NETSCRIPT=${CONFIG}
${SCRIPTFILE} ; eend $?
fi
fi
fi
fi
@@
-2026,6
+2031,7
@@
fi
# {{{ /cdrom/.*-options
config_debs(){
if checkbootparam 'debs' ; then
# {{{ /cdrom/.*-options
config_debs(){
if checkbootparam 'debs' ; then
+ iszsh && setopt localoptions shwordsplit
DEBS="$(getbootparam 'debs' 2>>$DEBUG)"
if ! echo $DEBS | grep -q '/'; then
# backwards compatibility: if no path is given get debs from debs/
DEBS="$(getbootparam 'debs' 2>>$DEBUG)"
if ! echo $DEBS | grep -q '/'; then
# backwards compatibility: if no path is given get debs from debs/
@@
-2423,7
+2429,7
@@
config_lvm(){
# {{{ debnet: setup network based on an existing one found on a partition
config_debnet(){
if checkbootparam 'debnet' ; then
# {{{ debnet: setup network based on an existing one found on a partition
config_debnet(){
if checkbootparam 'debnet' ; then
- iszsh && setopt shwordsplit
+ iszsh && setopt
localoptions
shwordsplit
DEVICES="$(< /proc/partitions tail -n +3 | awk '{print "/dev/"$4}' | tr "\n" " ")"
DEVICES="$DEVICES $(ls /dev/mapper/*)"
FOUND_DEBNET=""
DEVICES="$(< /proc/partitions tail -n +3 | awk '{print "/dev/"$4}' | tr "\n" " ")"
DEVICES="$DEVICES $(ls /dev/mapper/*)"
FOUND_DEBNET=""