diff options
| author | James Meyer <james.meyer@operamail.com> | 2008-12-14 16:47:02 (GMT) |
|---|---|---|
| committer | James Meyer <james.meyer@operamail.com> | 2008-12-14 16:47:02 (GMT) |
| commit | 7d67cf7e9452baaaa38042112d8ed8f13e8daf90 (patch) | |
| tree | eeec4a3f6d1f4af2a3975c33789a7711ed871944 /abs/core-testing/LinHES-config/networkconfig.sh | |
| parent | 6526e29a9d5425c0d294f7a376956b8440cb5631 (diff) | |
| download | linhes_pkgbuild-7d67cf7e9452baaaa38042112d8ed8f13e8daf90.zip linhes_pkgbuild-7d67cf7e9452baaaa38042112d8ed8f13e8daf90.tar.gz linhes_pkgbuild-7d67cf7e9452baaaa38042112d8ed8f13e8daf90.tar.bz2 | |
Cleanup of networkconfig.sh
Don't try to edit the options file if it's not present.
Diffstat (limited to 'abs/core-testing/LinHES-config/networkconfig.sh')
| -rw-r--r-- | abs/core-testing/LinHES-config/networkconfig.sh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/abs/core-testing/LinHES-config/networkconfig.sh b/abs/core-testing/LinHES-config/networkconfig.sh index 23e3774..5611265 100644 --- a/abs/core-testing/LinHES-config/networkconfig.sh +++ b/abs/core-testing/LinHES-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 |
