From 99e7ab06715250d377378965656d109222b1217a Mon Sep 17 00:00:00 2001 From: gutosie Date: Wed, 8 Dec 2021 21:52:07 +0200 Subject: [PATCH] Update stbbranding.py --- NeoBoot/files/stbbranding.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/NeoBoot/files/stbbranding.py b/NeoBoot/files/stbbranding.py index 805440a..958538a 100644 --- a/NeoBoot/files/stbbranding.py +++ b/NeoBoot/files/stbbranding.py @@ -971,12 +971,19 @@ def getMountPointNeo2(): os.system('echo "\n\nexit 0" >> ' + LinkNeoBoot + '/files/mountpoint.sh') def getBoxMacAddres(): - os.system("ifconfig eth0 |grep -i hwaddr |awk '{print $5}' > /tmp/.mymac") - if os.path.exists('/tmp/.mymac'): - with open('/tmp/.mymac', 'r') as f: - myboxmac = f.readline().strip() - f.close() - return myboxmac + os.system('%s > /tmp/.mymac' % ("ifconfig ")) + if fileExists('/tmp/.mymac'): + f = open("/tmp/.mymac", 'r') + myboxmac = f.readline().strip().replace("eth0 Link encap:Ethernet HWaddr ", "") + f.close() + EthernetMac = myboxmac + writefile = open('/tmp/.mymac' , 'w') + writefile.write(myboxmac) + writefile.close() + if not fileExists('/tmp/.mymac'): + EthernetMac = '12:34:56:78:91:02' + + return EthernetMac def getCheckActivateVip(): supportedvip = ''