summaryrefslogtreecommitdiffstats
path: root/abs/core
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2016-11-22 20:14:05 (GMT)
committerBritney Fransen <brfransen@gmail.com>2016-11-22 20:14:05 (GMT)
commitc05281ffd36f9089a84e3f672e5a1bce9b659679 (patch)
treeb4372dae4af3b4abc1e32386d161c7e4935b071e /abs/core
parent27a16f8e37094aeea9d72ad02aeb0a9f4ff28aec (diff)
downloadlinhes_pkgbuild-c05281ffd36f9089a84e3f672e5a1bce9b659679.zip
linhes_pkgbuild-c05281ffd36f9089a84e3f672e5a1bce9b659679.tar.gz
linhes_pkgbuild-c05281ffd36f9089a84e3f672e5a1bce9b659679.tar.bz2
LinHES-config: mv_network.py: fix upgrade when not connected to network
Diffstat (limited to 'abs/core')
-rwxr-xr-xabs/core/LinHES-config/PKGBUILD4
-rwxr-xr-xabs/core/LinHES-config/mv_network.py18
2 files changed, 14 insertions, 8 deletions
diff --git a/abs/core/LinHES-config/PKGBUILD b/abs/core/LinHES-config/PKGBUILD
index ed6cca9..eea1dfa 100755
--- a/abs/core/LinHES-config/PKGBUILD
+++ b/abs/core/LinHES-config/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=LinHES-config
pkgver=8.4.2
-pkgrel=1
+pkgrel=2
conflicts=(MythVantage-config MythVantage-config-dev LinHES-config-dev LinHes-config )
pkgdesc="Install and configure your system"
depends=('bc' 'libstatgrab' 'mysql-python' 'expect' 'curl' 'dnsutils' 'parted'
@@ -166,7 +166,7 @@ md5sums=('97b810ddc35d1f441dbe8cdd6886e2af'
'b845de3e05c1734cce4b9ac5e8f1baaf'
'02b4378b17bca6bebdcc2258a80dfc6b'
'8b7dce4a3a0a281fa6656aa8781a648e'
- '4b10fff21a0274f950f97f2b61e92463'
+ '3ef3f589f46d0b59603226fef325e611'
'824e49d9b01fed295c704ab68908b464'
'fe5e31b833cc6707209e9d656b6eb53c'
'336f08aed2e3c0b9fd09563933d54735'
diff --git a/abs/core/LinHES-config/mv_network.py b/abs/core/LinHES-config/mv_network.py
index a4ad0c9..559a226 100755
--- a/abs/core/LinHES-config/mv_network.py
+++ b/abs/core/LinHES-config/mv_network.py
@@ -53,17 +53,23 @@ def get_ip(ifname):
logging.debug(" Found %s in all_interfaces", ifname)
else:
logging.critical("* Couldn't find %s in list", ifname)
- ifname = all_if[0]
+ try:
+ ifname = all_if[0]
+ except:
+ ifname = ifname
logging.critical("* Using %s for interface name", ifname)
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
- ip = socket.inet_ntoa(fcntl.ioctl(
- s.fileno(),
- 0x8915, # SIOCGIFADDR
- struct.pack('256s', ifname[:15])
- )[20:24])
+ try:
+ ip = socket.inet_ntoa(fcntl.ioctl(
+ s.fileno(),
+ 0x8915, # SIOCGIFADDR
+ struct.pack('256s', ifname[:15])
+ )[20:24])
+ except:
+ ip = "127.0.0.1"
logging.debug(" get_ip ip address is %s", ip)
return ip