Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLord Anton Hvornum <anton.feeds@gmail.com>2018-04-07 10:05:30 +0200
committerLord Anton Hvornum <anton.feeds@gmail.com>2018-04-07 10:05:30 +0200
commit95b4d073ed394727692a2794df6deab0afa3d053 (patch)
treef0688aea2f6f0cb4022deae7aeddae9730439025
parent828cca1beb78d86a6d646b24aed9d412b8b2b890 (diff)
Modified the install command and debug output
-rw-r--r--archinstall.py46
-rw-r--r--deployments/9c:d6:43:ae:11:4f.json2
2 files changed, 26 insertions, 22 deletions
diff --git a/archinstall.py b/archinstall.py
index 1d3672a0..f078445f 100644
--- a/archinstall.py
+++ b/archinstall.py
@@ -213,7 +213,8 @@ if __name__ == '__main__':
#o = run('arch-chroot /mnt usermod --password {} root'.format(PIN))
#TODO: This doesn't work either: (why the hell not?)
# echo "newpass" | passwd --stdin root ?
- o = run("arch-chroot /mnt echo 'root:{pin}' | chpasswd".format(**args, pin=PIN))
+ #o = run("arch-chroot /mnt echo 'root:{pin}' | chpasswd".format(**args, pin=PIN))
+ o = run('arch-chroot /mnt echo "{pin}" | passwd --stdin root'.format(**args, pin=PIN))
if 'user' in args:
o = run('arch-chroot /mnt useradd -m -G wheel {user}'.format(**args))
o = run("arch-chroot /mnt echo '{user}:{pin}' | chpasswd".format(**args, pin=PIN))
@@ -241,25 +242,28 @@ if __name__ == '__main__':
entry.write('initrd /initramfs-linux.img\n')
entry.write('options cryptdevice=UUID={UUID}:luksdev root=/dev/mapper/luksdev rw intel_pstate=no_hwp\n'.format(UUID=UUID))
- locmac = get_local_MACs()
- for mac in locmac:
- try:
- instructions = grab_url_data('https://raw.githubusercontent.com/Torxed/archinstall/net-deploy/deployments/{}.json'.format(mac))
- except urllib.error.HTTPError:
- print('[N] No instructions for this box on this mac: {}'.format(mac))
- continue
-
- instructions = json.loads(instructions.decode('UTF-8'))
-
- for title in instructions:
- print('[N] {}'.format(title))
- for command in instructions[title]:
- o = run(command) # arch-chroot /mnt ...
- if instructions[title][command]:
+ ## == If we got networking,
+ # Try fetching instructions for this box and execute them.
+ if get_default_gateway_linux():
+ locmac = get_local_MACs()
+ for mac in locmac:
+ try:
+ instructions = grab_url_data('https://raw.githubusercontent.com/Torxed/archinstall/net-deploy/deployments/{}.json'.format(mac))
+ except urllib.error.HTTPError:
+ print('[N] No instructions for this box on this mac: {}'.format(mac))
+ continue
+
+ instructions = json.loads(instructions.decode('UTF-8'))
+
+ for title in instructions:
+ print('[N] {}'.format(title))
+ for command in instructions[title]:
+ o = run(command) # arch-chroot /mnt ...
+ #if instructions[title][command]:
print(o)
- o = run('umount -R /mnt')
- if args['post'] == 'reboot':
- o = run('reboot now')
- else:
- print('Done. "reboot" when you\'re done tinkering.')
+ #o = run('umount -R /mnt')
+ #if args['post'] == 'reboot':
+ # o = run('reboot now')
+ #else:
+ # print('Done. "reboot" when you\'re done tinkering.')
diff --git a/deployments/9c:d6:43:ae:11:4f.json b/deployments/9c:d6:43:ae:11:4f.json
index 6b4bd69e..ab988e44 100644
--- a/deployments/9c:d6:43:ae:11:4f.json
+++ b/deployments/9c:d6:43:ae:11:4f.json
@@ -1,5 +1,5 @@
{
"install ssh": {
- "pacman -y -S cmatrix" : null
+ "pacman -Syy --noconfirm cmatrix" : null
}
}