Merge branch 'change-config-folder' into 'master'

Name the folder for configuration files "sysrescue.d" rather than "config.d" (#170)

See merge request systemrescue/systemrescue-sources!148
This commit is contained in:
Francois Dupoux 2022-01-03 13:39:43 +00:00
commit add60264a2
5 changed files with 8 additions and 8 deletions

View file

@ -34,7 +34,7 @@ config_global = {
# Load configuration from the yaml files
# ==============================================================================
print(f"====> Loading configuration from yaml files located on the boot device ...")
yamlconfdirs = ["/run/archiso/bootmnt/config.d", "/run/archiso/copytoram/config.d"]
yamlconfdirs = ["/run/archiso/bootmnt/sysrescue.d", "/run/archiso/copytoram/sysrescue.d"]
def parse_config_file(yamlfile):
print(f"Parsing yaml file: {yamlfile} ...")

View file

@ -348,7 +348,7 @@ make_prepare() {
# Build ISO
make_iso() {
cp ${version_file} ${work_dir}/iso/${install_dir}/
cp -r config.d/ ${work_dir}/iso/
cp -r sysrescue.d/ ${work_dir}/iso/
(
shopt -s nullglob
rm -vf ${work_dir}/iso/${install_dir}/*.srm

View file

@ -13,10 +13,10 @@ diff -urN archiso-43-a/archiso/initcpio/hooks/archiso archiso-43-b/archiso/initc
+ launch_interactive_shell
+ fi
+ fi
+ if ls -lh /run/archiso/bootmnt/config.d >/dev/null 2>/dev/null; then
+ 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/config.d /run/archiso/copytoram/ ; then
+ echo "ERROR: failed to copy '/run/archiso/bootmnt/config.d' to '/run/archiso/copytoram/'"
+ 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

View file

@ -8,10 +8,10 @@ index 51dfcc1..fe709cf 100644
+ msg ":: Attempt to read configuration from yaml files ..."
+
+ if ls -l /run/archiso/bootmnt/config.d/*.[Yy][Aa][Mm][Ll] >/dev/null 2>/dev/null
+ if ls -l /run/archiso/bootmnt/sysrescue.d/*.[Yy][Aa][Mm][Ll] >/dev/null 2>/dev/null
+ then
+ echo "Found yaml files in /run/archiso/bootmnt/config.d"
+ for curfile in /run/archiso/bootmnt/config.d/*.[Yy][Aa][Mm][Ll]
+ echo "Found yaml files in /run/archiso/bootmnt/sysrescue.d"
+ for curfile in /run/archiso/bootmnt/sysrescue.d/*.[Yy][Aa][Mm][Ll]
+ do
+ echo "Parsing ${curfile} ..."
+ shortname=$(basename ${curfile})