X-Git-Url: https://iankelling.org/git/?p=automated-distro-installer;a=blobdiff_plain;f=archlike-pxe;fp=arch-pxe;h=ba39c456d4d4a18bb5c1fbd26f22df27be3cd7d1;hp=78205442c62e4b3fe9f1623e43ce6f3c6cf1d31d;hb=0d7f79362d601b278236cd1c533c7333e342b54a;hpb=15da839e14b07b30de9c3f7559bd17213e4f193d diff --git a/arch-pxe b/archlike-pxe similarity index 78% rename from arch-pxe rename to archlike-pxe index 7820544..ba39c45 100755 --- a/arch-pxe +++ b/archlike-pxe @@ -1,4 +1,4 @@ -#!/bin/bash -lx +#!/bin/bash -l # Copyright (C) 2016 Ian Kelling # This program is free software; you can redistribute it and/or @@ -42,20 +42,19 @@ esac x="$(readlink -f "$BASH_SOURCE")" script_dir="${x%/*}" -cd /a/opt -iso="parabola-systemd-cli-x86_64-netinstall-2017.10.18-00.07-alpha" -rm -rf $iso -ex $iso.iso -n=parabola -if [[ ! -e $iso/parabola ]]; then - n=arch -fi -sfs=$iso/$n/x86_64/*.sfs - -sed -i --follow-symlinks -f - $iso/$n/boot/syslinux/${n}iso_pxe64.cfg < airootfs.md5; popd # seems if you've done a pxe boot, mounted the nfs, # then shutdown, it's still busy. ssh wrt "/etc/init.d/nfsd stop; \ -{ ! mount | grep /run/archiso/bootmnt || umount /run/archiso/bootmnt; } && \ -rm -rf /mnt/usb/$iso" -scp -r $iso wrt:/mnt/usb -ssh wrt "cd /mnt/usb && rm -f tftpboot && ln -s $iso tftpboot" +umount /run/archiso/bootmnt; \ +umount /run/parabolaiso/bootmnt; \ +rm -rf /mnt/usb/$idir" + +scp -r $idir wrt:/mnt/usb +ssh wrt "cd /mnt/usb && rm -f tftpboot && ln -s $idir tftpboot" # The default settings in the installer expect to find the NFS at /run/archiso/bootmnt @@ -88,5 +89,5 @@ ssh wrt "cd /mnt/usb && rm -f tftpboot && ln -s $iso tftpboot" # arch can do netboot like ubuntu etc, but the docs look a little # complicated, so fuck it, we use nfs cuz it's easy -rm -rf $iso +rm -rf $idir s rm -rf squashfs-root