diff options
| author | An-Cheng Huang <ancheng@vyatta.com> | 2009-04-10 16:01:23 -0700 |
|---|---|---|
| committer | An-Cheng Huang <ancheng@vyatta.com> | 2009-04-10 16:01:23 -0700 |
| commit | e557e8a53145506bd95cd37c5e672169ad85b23a (patch) | |
| tree | dcaa330a658e7c06f2766845cbc5dfbeaea2de24 /scripts/functions | |
| parent | 2e53aeece24d032eb852d6c784d17081c821e268 (diff) | |
| parent | b9c92a3bb82e860c8368eb7933f5ec4ddcd74bcb (diff) | |
| download | initramfs-tools-e557e8a53145506bd95cd37c5e672169ad85b23a.tar.gz initramfs-tools-e557e8a53145506bd95cd37c5e672169ad85b23a.zip | |
Merge branch 'upstream' into jenner
Conflicts:
debian/changelog
Diffstat (limited to 'scripts/functions')
| -rw-r--r-- | scripts/functions | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/scripts/functions b/scripts/functions index 299c29c..f715e68 100644 --- a/scripts/functions +++ b/scripts/functions @@ -55,7 +55,7 @@ panic() maybe_break() { - if [ "${break}" = "$1" ]; then + if [ "${break:-}" = "$1" ]; then panic "Spawning shell within the initramfs" fi } @@ -238,7 +238,7 @@ parse_numeric() { /*) return ;; - *:*) + [0-9]*:[0-9]*) minor=${1#*:} major=${1%:*} ;; @@ -261,20 +261,21 @@ configure_networking() # networking already configured thus bail out [ -n "${DEVICE}" ] && [ -e /tmp/net-"${DEVICE}".conf ] && return 0 - # support ip options see linux sources Documentation/nfsroot.txt + # support ip options see linux sources + # Documentation/filesystems/nfsroot.txt case ${IPOPTS} in none|off) # Do nothing ;; ""|on|any) # Bring up device - ipconfig ${DEVICE} + ipconfig -t 180 ${DEVICE} ;; dhcp|bootp|rarp|both) - ipconfig -c ${IPOPTS} -d ${DEVICE} + ipconfig -t 180 -c ${IPOPTS} -d ${DEVICE} ;; *) - ipconfig -d $IPOPTS + ipconfig -t 180 -d $IPOPTS # grab device entry from ip option NEW_DEVICE=${IPOPTS#*:*:*:*:*:*} @@ -303,6 +304,6 @@ configure_networking() # Wait for queued kernel/udev events wait_for_udev() { - [ -x "$(command -v udevadm)" ] && return 0 + [ -x "$(command -v udevadm)" ] || return 0 udevadm settle ${1:+--timeout=$1} } |
