Set nodev rather than just warning about it.
authorDaniel Hokka Zakrisson <daniel@hozac.com>
Sat, 27 Jan 2007 10:20:40 +0000 (10:20 +0000)
committerDaniel Hokka Zakrisson <daniel@hozac.com>
Sat, 27 Jan 2007 10:20:40 +0000 (10:20 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2477 94cd875c-1c1d-0410-91d2-eb244daf1a30

scripts/vserver-setup.functions

index cb484fd..3ff48f0 100644 (file)
@@ -156,8 +156,10 @@ function _setup_writeInterface
     _setup_writeSingleOption "$mask"   $d/mask
     _setup_writeSingleOption "$prefix" $d/prefix
 
-    test -n "$dev" -o -n "$SETUP_NETDEV" || \
-       echo $"No device specified for interface '$idx'; do not forget to set the 'nodev' option" >&2
+    test -n "$dev" -o -n "$SETUP_NETDEV" || {
+       echo $"No device specified for interface '$idx'; setting 'nodev'" >&2
+       $_TOUCH $d/nodev
+    }
 }
 
 function setup_setDefaults