Update extract.py

This commit is contained in:
gutosie
2024-11-23 13:10:14 +02:00
committed by GitHub
parent 38da91e538
commit c5c4abd774

View File

@@ -443,14 +443,14 @@ def NEOBootMainEx(source, target, CopyFiles, CopyKernel, TvList, LanWlan, Sterow
#rc = os.system(cmd)
# for all image:
#copying zerotier script
#copying zerotier script if exists
if os.path.exists('/var/lib/zerotier-one/identity.secret'):
cmd = 'mkdir -p ' + getNeoLocation() + 'ImageBoot/%s/var/lib/zerotier-one' % target
rc = os.system(cmd)
cmd1 = 'cp -af /var/lib/zerotier-one/identity.secret ' + getNeoLocation() + 'ImageBoot/%s/var/lib/zerotier-one/' % target
rc = os.system(cmd1)
#copying tailscale
#copying tailscale if exists
if os.path.exists('/var/lib/tailscale/tailscaled.state'):
cmd = 'mkdir -p ' + getNeoLocation() + 'ImageBoot/%s/var/lib/tailscale' % target
rc = os.system(cmd)
@@ -458,16 +458,31 @@ def NEOBootMainEx(source, target, CopyFiles, CopyKernel, TvList, LanWlan, Sterow
rc = os.system(cmd1)
cmd2 = 'cp -af /var/lib/tailscale/* ' + getNeoLocation() + 'ImageBoot/%s/var/lib/tailscale/' % target
rc = os.system(cmd2)
cmd3 = 'cp -af /usr/sbin/tailscaled ' + getNeoLocation() + 'ImageBoot/%s/usr/sbin/' % target
rc = os.system(cmd3)
if os.path.exists('/usr/sbin/tailscaled'):
cmd3 = 'cp -af /usr/sbin/tailscaled ' + getNeoLocation() + 'ImageBoot/%s/susr/sbin/' % target
rc = os.system(cmd3)
elif os.path.exists('/usr/bin/tailscaled'):
cmd3 = 'cp -af /usr/bin/tailscaled ' + getNeoLocation() + 'ImageBoot/%s/usr/bin/' % target
rc = os.system(cmd3)
cmd4 = 'cp -af /usr/bin/tailscale ' + getNeoLocation() + 'ImageBoot/%s/usr/bin/' % target
rc = os.system(cmd4)
cmd5 = 'cp -af /etc/init.d/tailscal* ' + getNeoLocation() + 'ImageBoot/%s/etc/init.d/' % target
rc = os.system(cmd5)
#cmd6 = 'cp -aRf /run/tailscale/tailscaled.sock' + getNeoLocation() + 'ImageBoot/%s/run/tailscale/' % target
#rc = os.system(cmd6)
#cmd7 = 'cp -aRf /run/resolvconf/interfaces/tailscale' + getNeoLocation() + 'ImageBoot/%s/run/tailscale/' % target
#rc = os.system(cmd7)
rc = os.system(cmd5)
if not os.path.exists('%s/ImageBoot/%s/lib/modules/kernel/drivers/net/tun.ko' % (media, target)):
if not os.path.exists('%s/ImageBoot/%s/lib/modules/kernel/drivers/net' % (media, target)):
#cmd = 'mkdir -p ' + getNeoLocation() + 'ImageBoot/%s/lib/modules/' + getKernelVersion() + '/kernel/drivers/net/' % target
cmd = 'mkdir -p %s/ImageBoot/%s/lib/modules/kernel/drivers/net/' % (media, target)
rc = os.system(cmd)
cmd = 'cp -af /lib/modules/' + getKernelVersion() + '/kernel/drivers/net/tun.ko %s/ImageBoot/%s/lib/modules/kernel/drivers/net/' % (media, target)
rc = os.system(cmd)
if not os.path.exists('%s/ImageBoot/%s/var/run/tailscale' % (media, target)):
cmd = 'mkdir -p ' + getNeoLocation() + '/ImageBoot/%s/run/tailscale/' % target
rc = os.system(cmd)
if os.path.exists('/run/tailscale'):
cmd = 'cp -aRf /run/tailscale/tailscaled.sock ' + getNeoLocation() + 'ImageBoot/%s/run/tailscale/' % target
rc = os.system(cmd)
cmd1 = 'cp -aRf /run/resolvconf/interfaces/tailscale ' + getNeoLocation() + 'ImageBoot/%s/run/tailscale/' % target
rc = os.system(cmd1)
if os.path.exists('%s/ImageBoot/%s/etc/init.d' % (media, target)):
cmd = 'ln -s %sImageBoot/%s/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/userscript.sh %sImageBoot/%s/etc/rcS.d/S99neo.local' % (media,