Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds@gmail.com>2019-06-20 18:25:43 +0000
committerAnton Hvornum <anton.feeds@gmail.com>2019-06-20 18:25:43 +0000
commitf928a4b72cbdcf1ea4ec09267e184016e8c91f45 (patch)
tree8a5a5e9c2e280d652451155248b0f9d0c6f197da /archinstall.py
parenteb3a846be83e42a2947f34b2319cca191117a45d (diff)
probihiting recursion bombs regarding git pull
Diffstat (limited to 'archinstall.py')
-rw-r--r--archinstall.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/archinstall.py b/archinstall.py
index df0525cd..1f5edcee 100644
--- a/archinstall.py
+++ b/archinstall.py
@@ -262,8 +262,7 @@ def update_git():
if os.path.isfile('/root/archinstall/README.md'):
os.remove('/root/archinstall/README.md')
- #output = simple_command('(cd /root/archinstall; git reset --hard origin/$(git branch | grep "*" | cut -d\' \' -f 2); git pull)')
- output = simple_command('(cd /root/archinstall; git pull)')
+ output = simple_command('(cd /root/archinstall; git reset --hard origin/$(git branch | grep "*" | cut -d\' \' -f 2); git pull)')
if b'error:' in output:
print('[N] Could not update git source for some reason.')
@@ -271,17 +270,17 @@ def update_git():
# b'From github.com:Torxed/archinstall\n 339d687..80b97f3 master -> origin/master\nUpdating 339d687..80b97f3\nFast-forward\n README.md | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n'
if output != b'Already up to date':
- print(output)
#tmp = re.findall(b'[0-9]+ file changed', output)
#print(tmp)
#if len(tmp):
# num_changes = int(tmp[0].split(b' ',1)[0])
# if(num_changes):
- ## Reboot the script (in same context)
- print('[N] Rebooting the script')
- os.execv('/usr/bin/python3', ['archinstall.py'] + sys.argv)
- extit(1)
+ if not 'rebooted' in args:
+ ## Reboot the script (in same context)
+ print('[N] Rebooting the script')
+ os.execv('/usr/bin/python3', ['archinstall.py', '--rebooted'] + sys.argv)
+ extit(1)
def device_state(name):
# Based out of: https://askubuntu.com/questions/528690/how-to-get-list-of-all-non-removable-disk-device-names-ssd-hdd-and-sata-ide-onl/528709#528709