mirror of
https://github.com/nchevsky/systemrescue-zfs.git
synced 2026-02-03 06:14:37 +01:00
Merge branch 'autorun-copytoram' into 'master'
Copy autorun scripts to new location when copytoram is enabled See merge request fdupoux/sysresccd-src!66
This commit is contained in:
commit
c9fcee3a1e
|
|
@ -33,7 +33,7 @@ basedir='/var/autorun'
|
|||
autorunlog=basedir+'/log'
|
||||
autorunmnt=basedir+'/mnt'
|
||||
autoruntmp=basedir+'/tmp'
|
||||
defaultsrc=['/run/archiso/bootmnt','/var/autorun/cdrom','/root','/usr/share/sys.autorun']
|
||||
defaultsrc=['/run/archiso/bootmnt','/run/archiso/copytoram','/var/autorun/cdrom','/root','/usr/share/sys.autorun']
|
||||
ar_autoruns=['']+list('0123456789ABCDEF')
|
||||
cmdline=open('/proc/cmdline').read()
|
||||
autorunfiles=[]
|
||||
|
|
|
|||
19
patches/archiso-06-autorun-copytoram.patch
Normal file
19
patches/archiso-06-autorun-copytoram.patch
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
diff --git a/archiso/initcpio/hooks/archiso b/archiso/initcpio/hooks/archiso
|
||||
index 3eb7ac7..e4585af 100644
|
||||
--- a/archiso/initcpio/hooks/archiso
|
||||
+++ b/archiso/initcpio/hooks/archiso
|
||||
@@ -247,6 +247,14 @@ archiso_mount_handler() {
|
||||
|
||||
_mnt_sfs "/run/archiso/bootmnt/${archisobasedir}/${arch}/airootfs.sfs" "/run/archiso/sfs/airootfs"
|
||||
|
||||
+ if [[ "${copytoram}" == "y" ]] && ls -lh /run/archiso/bootmnt/autorun* >/dev/null; then
|
||||
+ msg -n ":: Copying autorun scripts to RAM..."
|
||||
+ if ! cp /run/archiso/bootmnt/autorun* /run/archiso/copytoram/ ; then
|
||||
+ echo "ERROR: while copy '/run/archiso/bootmnt/autorun*' to '/run/archiso/copytoram/'"
|
||||
+ launch_interactive_shell
|
||||
+ fi
|
||||
+ fi
|
||||
+
|
||||
[[ "${loadsrm}" == "y" ]] && _mnt_srm "/run/archiso/bootmnt/${archisobasedir}"
|
||||
|
||||
if [[ -f "/run/archiso/sfs/airootfs/airootfs.img" ]]; then
|
||||
Loading…
Reference in a new issue