projects
/
platform
/
upstream
/
dracut.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
268de90
)
netroot: Check argument
author
Philippe Seewer
<philippe.seewer@bfh.ch>
Tue, 16 Jun 2009 09:08:40 +0000
(11:08 +0200)
committer
Philippe Seewer
<philippe.seewer@bfh.ch>
Wed, 17 Jun 2009 06:37:39 +0000
(08:37 +0200)
There's no sense in running netroot without a valid first argument
and further running netroot with no interface config present isn't
good as well.
modules.d/40network/netroot
patch
|
blob
|
history
diff --git
a/modules.d/40network/netroot
b/modules.d/40network/netroot
index
75313ba
..
a2ef22f
100755
(executable)
--- a/
modules.d/40network/netroot
+++ b/
modules.d/40network/netroot
@@
-8,6
+8,12
@@
getarg rdnetdebug && {
set -x
}
+# Huh? Empty $1?
+[ -z "$1" ] && exit 1
+
+# Huh? No interface config?
+[ ! -e /tmp/net.$1.up ] && exit 1
+
# Only try to configure from one network interface at a time
#
[ "$NETROOT_LOCKED" ] || {