r1852
dslinux_jss at dslinux.in-berlin.de
dslinux_jss at dslinux.in-berlin.de
Sun Aug 5 21:25:39 CEST 2007
Author: jss
Date: 2007-08-05 21:25:34 +0200 (Sun, 05 Aug 2007)
New Revision: 1852
Log:
Fix rc.d/network so that loading profiles in wnc works even if NETWORK_CONFIG is defined in rc.conf.
Reported in http://www.dslinux.org/index.php?showtopic=974
Modified: trunk/vendors/Nintendo/common/rc.d/network
===================================================================
--- trunk/vendors/Nintendo/common/rc.d/network 2007-07-30 09:25:04 UTC (rev 1851)
+++ trunk/vendors/Nintendo/common/rc.d/network 2007-08-05 19:25:34 UTC (rev 1852)
@@ -1,11 +1,18 @@
#!/bin/sh
-
+# Save NETWORK_CONFIG before sourcing so it doesn't get overridden
+[ -n "$NETWORK_CONFIG" ] && NETWORK_CONFIG_ENV="$NETWORK_CONFIG"
[ -e /etc/rc.defaults ] && . /etc/rc.defaults
[ -e /etc/rc.conf ] && . /etc/rc.conf
# Source a custom configuration file if specified
# in the environment.
-[ -n "$NETWORK_CONFIG" ] && . "$NETWORK_CONFIG"
+if [ -n "$NETWORK_CONFIG_ENV" ]
+then
+ . "$NETWORK_CONFIG_ENV"
+elif [ -n "$NETWORK_CONFIG" ]
+then
+ . "$NETWORK_CONFIG"
+fi
case "$1" in
start)
More information about the dslinux-commit
mailing list