diff --git a/README.md b/README.md index 9898ff2..1dcf808 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ The scripts will take it from there, asking you for information and downloading - `install-stage1.sh`: sets up the base system and prepares for installation stage 2 - `install-stage2.sh`: continues setting up things after booting into the freshly installed base system -- `opt/`: contains files to be installed in /opt/void-usb/ +- `usr/local/sbin/`: contains files to be installed in /usr/local/sbin - `grub-config`: custom grub config generator (probably not necessary but at this point I don’t wanna dig into the default one) - `system-image`: helper script to rebuild the squashfs - `kernel.d/`: kernel hooks to be installed in /etc/kernel.d diff --git a/install-stage1.sh b/install-stage1.sh index bd45bc1..c040327 100644 --- a/install-stage1.sh +++ b/install-stage1.sh @@ -387,12 +387,12 @@ chmod 744 /mnt/target/lib/dracut/modules.d/90void-usb/overlay.sh >> $LOGFILE 2>& echo "done" echo -n "Adding system-image helper... " -mkdir -p /mnt/target/opt/void-usb >> $LOGFILE 2>&1 -chmod 755 /mnt/target/opt/void-usb >> $LOGFILE 2>&1 -wget --output-document=/mnt/target/opt/void-usb/system-image "$GIT_REPO_BASE/opt/system-image" >> $LOGFILE 2>&1 -chmod 744 /mnt/target/opt/void-usb/system-image >> $LOGFILE 2>&1 +mkdir -p /mnt/target/usr/local/sbin >> $LOGFILE 2>&1 +chmod 755 /mnt/target/usr/local/sbin >> $LOGFILE 2>&1 +wget --output-document=/mnt/target/usr/local/sbin/system-image "$GIT_REPO_BASE/usr/local/sbin/system-image" >> $LOGFILE 2>&1 +chmod 744 /mnt/target/usr/local/sbin/system-image >> $LOGFILE 2>&1 echo " -/opt/void-usb/system-image" >> /mnt/target/etc/rc.shutdown +/usr/local/sbin/system-image" >> /mnt/target/etc/rc.shutdown echo "done" echo "Adding fstab." @@ -607,8 +607,8 @@ run_in_target grub-install --target=x86_64-efi --boot-directory=/boot/efi/LOADER echo "done" echo -n "Adding grub-config helper... " -wget --output-document=/mnt/target/opt/void-usb/grub-config "$GIT_REPO_BASE/opt/grub-config" >> $LOGFILE 2>&1 -chmod 744 /mnt/target/opt/void-usb/grub-config >> $LOGFILE 2>&1 +wget --output-document=/mnt/target/usr/local/sbin/grub-config "$GIT_REPO_BASE/usr/local/sbin/grub-config" >> $LOGFILE 2>&1 +chmod 744 /mnt/target/usr/local/sbin/grub-config >> $LOGFILE 2>&1 echo "done" echo -n "Adding kernel hooks... " @@ -632,7 +632,7 @@ echo "done" echo -n "Adding stage 2 installer... " -STAGE2_DIR="/mnt/target/opt/void-usb/installer" +STAGE2_DIR="/mnt/target/usr/local/sbin/installer" function get_stage2_file { [ -d "$STAGE2_DIR/$(dirname $1)" ] || mkdir -p "$STAGE2_DIR/$(dirname $1)" wget --output-document="$STAGE2_DIR/$1" "$GIT_REPO_BASE/$1" >> $LOGFILE 2>&1 @@ -658,7 +658,7 @@ fi' > /mnt/target/etc/sv/agetty-tty1/conf echo "if ps aux | grep 'installer-stage2.sh' | grep -v 'grep' > /dev/null 2>&1; then true else - /opt/void-usb/installer/install-stage2.sh + /usr/local/sbin/installer/install-stage2.sh exit fi" > /mnt/target/root/.profile @@ -674,5 +674,5 @@ The installer will now create a system image and reboot the computer. press_any_key echo "Creating system image..." -run_in_target /opt/void-usb/system-image --yes +run_in_target /usr/local/sbin/system-image --yes reboot diff --git a/install-stage2.sh b/install-stage2.sh index a2e3203..00b8e3d 100644 --- a/install-stage2.sh +++ b/install-stage2.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash LOGFILE=/tmp/void-usb-install-log -STAGE2_DIR="/opt/void-usb/installer/" +STAGE2_DIR="/usr/local/sbin/installer/" function press_any_key { echo "Press any key to continue or Ctrl+c to abort..." diff --git a/kernel.d/post-install/99-void-usb b/kernel.d/post-install/99-void-usb index 350fc89..f1014b4 100644 --- a/kernel.d/post-install/99-void-usb +++ b/kernel.d/post-install/99-void-usb @@ -39,4 +39,4 @@ echo "Default kernel and initramfs are now: $NEW_LINUX_FILE, $NEW_INITRAMFS_FILE #################### # Update GRUB config #################### -/opt/void-usb/grub-config +/usr/local/sbin/grub-config diff --git a/kernel.d/post-remove/99-void-usb b/kernel.d/post-remove/99-void-usb index a8fea0a..af55c1e 100644 --- a/kernel.d/post-remove/99-void-usb +++ b/kernel.d/post-remove/99-void-usb @@ -7,4 +7,4 @@ PKGNAME="$1" VERSION="$2" -/opt/void-usb/grub-config +/usr/local/sbin/grub-config diff --git a/opt/grub-config b/usr/local/sbin/grub-config similarity index 100% rename from opt/grub-config rename to usr/local/sbin/grub-config diff --git a/opt/system-image b/usr/local/sbin/system-image similarity index 100% rename from opt/system-image rename to usr/local/sbin/system-image