summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/LinHES-config
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core-testing/LinHES-config')
-rwxr-xr-xabs/core-testing/LinHES-config/PKGBUILD2
-rw-r--r--abs/core-testing/LinHES-config/networkconfig.sh34
2 files changed, 20 insertions, 16 deletions
diff --git a/abs/core-testing/LinHES-config/PKGBUILD b/abs/core-testing/LinHES-config/PKGBUILD
index d35dfbb..d9f7f20 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=89
+pkgrel=93
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 61a7405..9ad2d4e 100644
--- a/abs/core-testing/LinHES-config/networkconfig.sh
+++ b/abs/core-testing/LinHES-config/networkconfig.sh
@@ -6,7 +6,7 @@ ETCNETDIR=$BASE/etc/net/ifaces
-function kill_dhcp ()
+function kill_dhcp ()
{
for i in ${BASE}/etc/dhcpc/dhcpcd-*.pid
do
@@ -19,12 +19,12 @@ do
if [ x$1 = xflush ]
then
for ifdev in eth0 wlan0 eth1 wlan1
- do
+ do
echo ${i} |grep $ifdev
status=$?
if [ $status = 1 ]
then
- ip address flush $ifdev
+ ip address flush $ifdev
fi
done
fi
@@ -65,7 +65,7 @@ function setup_interfaces() {
TEMPNET=Hostnetmask$1
eval netmask=\$${TEMPNET}
netmask=`echo "$netmask" | cut -d " " -f1`
-
+
TEMPNET=HostActive$1
eval isactive=\$${TEMPNET}
@@ -78,24 +78,28 @@ function setup_interfaces() {
TEMPNET=HostGW$1
eval GW=\$${TEMPNET}
+ TEMPNET=HOST_iswireless$1
+ eval wireless=\$${TEMPNET}
+
+
- if [ $1 = wlan0 -o $1 = wlan1 ]
+ if [ x$wireless = x1 ]
then
IS_WIRELESS=TRUE
TEMPNET=HostESSID$1
eval ESSID=\$${TEMPNET}
-
+
TEMPNET="HostKey"$1
eval KEY=\$${TEMPNET}
-
+
TEMPNET=HostUseEncryption$1
eval ENCRYPT=\$${TEMPNET}
fi
-
+
echo "Setup $1 in progress, wireless: $IS_WIRELESS"
-
+
if [ ! -d $ETCNETDIR/$1 ]
then
mkdir -p $ETCNETDIR/$1
@@ -110,7 +114,7 @@ function setup_interfaces() {
then
echo "setting $1 to inactive"
sed -i -e 's/^ONBOOT=.*$/ONBOOT=no/g' $ETCNETDIR/$1/options
-
+
else
echo "setting $1 to active"
sed -i -e 's/^ONBOOT=.*$/ONBOOT=yes/g' $ETCNETDIR/$1/options
@@ -126,7 +130,7 @@ function setup_interfaces() {
then
echo "key $KEY" >> $ETCNETDIR/$1/iwconfig
fi
-
+
else
echo "disabling wireless"
sed -i -e 's/^CONFIG_WIRLESS=.*$/CONFIG_WIRLESS=no/g' $ETCNETDIR/$1/options
@@ -139,7 +143,7 @@ function setup_interfaces() {
then
echo using dhcp
sed -i -e 's/^BOOTPROTO=.*$/BOOTPROTO=dhcp/g' $ETCNETDIR/$1/options
-
+
else
echo "using static ip"
sed -i -e 's/^BOOTPROTO=.*$/BOOTPROTO=static/g' $ETCNETDIR/$1/options
@@ -160,7 +164,7 @@ if [ x$MYTHDHCP = x1 ]
echo "nameserver 127.0.0.1" >> ${BASE}/etc/resolv.conf
fi
-for i in eth0 eth1 wlan0 wlan1
+for i in eth0 eth1 wlan0 wlan1
do
CURRENTIF="HostActive"$i
eval IFSTATE=\$${CURRENTIF}
@@ -219,11 +223,11 @@ function setup_MYTH_vars {
TEMPMYTH="Hostip"$default_interface
#echo $TEMPMYTH
eval MYTHIP=\$${TEMPMYTH}
-
+
TEMPMYTH="HostUSEDHCP"$default_interface
eval MYTHDHCP=\$${TEMPMYTH}
-
+
}