summaryrefslogtreecommitdiffstats
path: root/abs/mv-core/MythVantage-config/networkconfig.sh
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2008-12-14 19:21:58 (GMT)
committerJames Meyer <james.meyer@operamail.com>2008-12-14 19:21:58 (GMT)
commit717d0e9b4154c7d1d9c666072fddf94b16e08b68 (patch)
treeeeec4a3f6d1f4af2a3975c33789a7711ed871944 /abs/mv-core/MythVantage-config/networkconfig.sh
parent6526e29a9d5425c0d294f7a376956b8440cb5631 (diff)
downloadlinhes_pkgbuild-717d0e9b4154c7d1d9c666072fddf94b16e08b68.zip
linhes_pkgbuild-717d0e9b4154c7d1d9c666072fddf94b16e08b68.tar.gz
linhes_pkgbuild-717d0e9b4154c7d1d9c666072fddf94b16e08b68.tar.bz2
Cleanup of networkconfig.sh
Don't try to edit the options file if it's not present. closes FS#21
Diffstat (limited to 'abs/mv-core/MythVantage-config/networkconfig.sh')
-rw-r--r--abs/mv-core/MythVantage-config/networkconfig.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/abs/mv-core/MythVantage-config/networkconfig.sh b/abs/mv-core/MythVantage-config/networkconfig.sh
index b4ffd5c..5611265 100644
--- a/abs/mv-core/MythVantage-config/networkconfig.sh
+++ b/abs/mv-core/MythVantage-config/networkconfig.sh
@@ -51,8 +51,11 @@ function change_iface_state () {
sed -i -e 's/^DISABLED=.*$/DISABLED=no/g' $ETCNETDIR/$1/options
else
echo "setting $1 to inactive"
- sed -i -e 's/^ONBOOT=.*$/ONBOOT=no/g' $ETCNETDIR/$1/options
- sed -i -e 's/^DISABLED=.*$/DISABLED=yes/g' $ETCNETDIR/$1/options
+ if [ -e $ETCNETDIR/$1/options ]
+ then
+ sed -i -e 's/^ONBOOT=.*$/ONBOOT=no/g' $ETCNETDIR/$1/options
+ sed -i -e 's/^DISABLED=.*$/DISABLED=yes/g' $ETCNETDIR/$1/options
+ fi
/sbin/ifconfig $1 down
ip address flush $1
fi
@@ -262,6 +265,7 @@ function start_network {
if [ ! $USEVNC = 0 ]
then
/etc/net/scripts/network.init reload
+ /etc/net/scripts/network.init restart
else
echo "VNC/NETBOOT in use, will NOT restart network"
fi