opt, install_stage1, install_stage2: move /opt/void-usb to /usr/local/sbin

master
BodgeMaster 2026-07-16 15:13:35 +02:00
parent 9930dabd09
commit fac6679f4e
7 changed files with 14 additions and 14 deletions

View File

@ -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 dont 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

View File

@ -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

View File

@ -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..."

View File

@ -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

View File

@ -7,4 +7,4 @@
PKGNAME="$1"
VERSION="$2"
/opt/void-usb/grub-config
/usr/local/sbin/grub-config