summaryrefslogtreecommitdiffstats
path: root/abs/core-testing
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core-testing')
-rwxr-xr-xabs/core-testing/LinHES-config/PKGBUILD2
-rw-r--r--abs/core-testing/LinHES-config/networkconfig.sh52
-rwxr-xr-xabs/core-testing/LinHES-config/systemconfig.sh1
3 files changed, 41 insertions, 14 deletions
diff --git a/abs/core-testing/LinHES-config/PKGBUILD b/abs/core-testing/LinHES-config/PKGBUILD
index 2a8ad77..543d182 100755
--- a/abs/core-testing/LinHES-config/PKGBUILD
+++ b/abs/core-testing/LinHES-config/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=LinHES-config
pkgver=1.0
-pkgrel=96
+pkgrel=103
conflicts=(MythVantage-config MythVantage-config-dev LinHES-config-dev )
pkgdesc="Install and configure your system"
depends=(bc libstatgrab mysql-python expect curl dnsutils parted sg3_utils nmbscan )
diff --git a/abs/core-testing/LinHES-config/networkconfig.sh b/abs/core-testing/LinHES-config/networkconfig.sh
index 9ad2d4e..23e3774 100644
--- a/abs/core-testing/LinHES-config/networkconfig.sh
+++ b/abs/core-testing/LinHES-config/networkconfig.sh
@@ -43,6 +43,22 @@ fi
}
+function change_iface_state () {
+ if [ x$2 = xenabled ]
+ then
+ echo "setting $1 to active"
+ sed -i -e 's/^ONBOOT=.*$/ONBOOT=yes/g' $ETCNETDIR/$1/options
+ 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
+ /sbin/ifconfig $1 down
+ ip address flush $1
+ fi
+
+}
+
function setup_interfaces() {
local IS_WIRELESS
local ip
@@ -110,14 +126,17 @@ function setup_interfaces() {
cp -f $TEMPLATES/etcnet/eth/options $ETCNETDIR/$1/options
fi
- if [ x$isactive = x0 ]
+ if [ x$isactive = x1 ]
then
- echo "setting $1 to inactive"
- sed -i -e 's/^ONBOOT=.*$/ONBOOT=no/g' $ETCNETDIR/$1/options
-
+ change_iface_state $1 enabled
+ #echo "setting $1 to active"
+ #sed -i -e 's/^ONBOOT=.*$/ONBOOT=yes/g' $ETCNETDIR/$1/options
+ #sed -i -e 's/^DISABLED=.*$/DISABLED=no/g' $ETCNETDIR/$1/options
else
- echo "setting $1 to active"
- sed -i -e 's/^ONBOOT=.*$/ONBOOT=yes/g' $ETCNETDIR/$1/options
+ change_iface_state $1 disabled
+ #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
fi
if [ x$IS_WIRELESS = xTRUE ]
@@ -139,7 +158,7 @@ function setup_interfaces() {
- if [ $UseDHCP = 0 ]
+ if [ x$UseDHCP = x0 ]
then
echo using dhcp
sed -i -e 's/^BOOTPROTO=.*$/BOOTPROTO=dhcp/g' $ETCNETDIR/$1/options
@@ -168,11 +187,16 @@ for i in eth0 eth1 wlan0 wlan1
do
CURRENTIF="HostActive"$i
eval IFSTATE=\$${CURRENTIF}
+ echo $IFSTATE "---"
+ echo $i
if [ x$IFSTATE = x1 ]
then
setup_interfaces $i
+ else
+ change_iface_state $i disabled
fi
done
+
}
function setup_hostname {
@@ -233,23 +257,25 @@ function setup_MYTH_vars {
-function setup_network {
- setup_MYTH_vars
- setup_hostname
- find_active
-}
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
}
+function setup_network {
+ setup_MYTH_vars
+ setup_hostname
+ find_active
+}
+
+
function stop_network {
if [ ! $USEVNC = 0 ]
then
diff --git a/abs/core-testing/LinHES-config/systemconfig.sh b/abs/core-testing/LinHES-config/systemconfig.sh
index f2f20a0..3aac497 100755
--- a/abs/core-testing/LinHES-config/systemconfig.sh
+++ b/abs/core-testing/LinHES-config/systemconfig.sh
@@ -1081,6 +1081,7 @@ then
then
echo "loading network"
${BASE}/etc/net/scripts/network.init reload
+ ${BASE}/etc/net/scripts/network.init restart
else
echo "netboot, will not start network"
fi