mirror of
https://github.com/nchevsky/systemrescue-zfs.git
synced 2025-12-06 07:12:01 +01:00
- Implement a new style configuring autorun scripts ("autorun.exec"), more suited to a YAML config file than the old style (#287)
- The old style autorun scripts are still fully supported, they are loaded into keys from "1000-autorun" to "1026-autorunF"
- change the default for ar_nowait to true
- add "shell" option for new autorun exec scripts: let bash interpret the command instead of directly forking it from python
- allow to wait for keypress with a countdown timer, all keys are accepted now (instead of just enter as in the past)
- fix is_elf_binary
- improve output and logging (#253)
- use curl instead of wget for downloading scripts from URLs
- bind-mount /run/archios/bootmnt in case of copytoram to create a stable path for the new-style scripts
- deprecate storing autorun scripts in the root of the boot disk (#252)
- don't check /var/autorun/cdrom for autorun scripts anymore, it was not documented and there are more than enough better alternatives
37 lines
1.6 KiB
Diff
37 lines
1.6 KiB
Diff
diff -urN archiso-43-a/archiso/initcpio/hooks/archiso archiso-43-b/archiso/initcpio/hooks/archiso
|
|
--- archiso-43-a/archiso/initcpio/hooks/archiso 2021-12-31 23:32:15.547000000 +0000
|
|
+++ archiso-43-b/archiso/initcpio/hooks/archiso 2021-12-31 23:36:53.081000000 +0000
|
|
@@ -247,6 +247,23 @@
|
|
|
|
_mnt_sfs "/run/archiso/bootmnt/${archisobasedir}/${arch}/airootfs.sfs" "/run/archiso/sfs/airootfs"
|
|
|
|
+ if [[ "${copytoram}" == "y" ]]; then
|
|
+ if ls -lh /run/archiso/bootmnt/autorun* >/dev/null 2>/dev/null; then
|
|
+ msg ":: Copying autorun scripts to RAM ..."
|
|
+ if ! cp -r /run/archiso/bootmnt/autorun* /run/archiso/copytoram/ ; then
|
|
+ echo "ERROR: failed to copy '/run/archiso/bootmnt/autorun*' to '/run/archiso/copytoram/'"
|
|
+ launch_interactive_shell
|
|
+ fi
|
|
+ fi
|
|
+ if ls -lh /run/archiso/bootmnt/sysrescue.d >/dev/null 2>/dev/null; then
|
|
+ msg ":: Copying configuration files to RAM ..."
|
|
+ if ! cp -r /run/archiso/bootmnt/sysrescue.d /run/archiso/copytoram/ ; then
|
|
+ echo "ERROR: failed to copy '/run/archiso/bootmnt/sysrescue.d' to '/run/archiso/copytoram/'"
|
|
+ launch_interactive_shell
|
|
+ fi
|
|
+ fi
|
|
+ fi
|
|
+
|
|
[[ "${loadsrm}" == "y" ]] && _mnt_srm "/run/archiso/bootmnt/${archisobasedir}"
|
|
|
|
if [[ -f "/run/archiso/sfs/airootfs/airootfs.img" ]]; then
|
|
@@ -328,6 +328,8 @@
|
|
|
|
if [[ "${copytoram}" == "y" ]]; then
|
|
umount -d /run/archiso/bootmnt
|
|
+ # bind-mount bootmnt to create a stable path, for example for autorun scripts
|
|
+ mount --bind /run/archiso/copytoram /run/archiso/bootmnt
|
|
fi
|
|
}
|
|
|