~alpine/aports

Adding the possibility to override defaults config v1 PROPOSED

Laurent B: 1
 Adding the possibility to override defaults config

 2 files changed, 5 insertions(+), 4 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.alpinelinux.org/~alpine/aports/patches/666/mbox | git am -3
Learn more about email & git

[alpine-aports] [PATCH] Adding the possibility to override defaults config Export this patch

This allow to override default config files with custom, simply define
values in mkinitfs.conf:
* init: path to initramfs-init
* fstab: path to fstab
* passwd: path to passwd
* group: path to group
So, it's possible to customize the boot, and allow the busybox trigger
to use the customized configuration file
---
 Makefile    | 1 +
 mkinitfs.in | 8 ++++----
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 53c71ea..c5e7372 100644
--- a/Makefile
+++ b/Makefile
@@ -134,3 +134,4 @@ install: $(SBIN_FILES) $(SHARE_FILES) $(CONF_FILES)

mkinitfs.conf:
	echo 'features="$(DEFAULT_FEATURES)"' > $@
	echo '#init="/$(datadir)/initramfs-init"' >> $@
diff --git a/mkinitfs.in b/mkinitfs.in
index 8cd3de3..8c7aa66 100755
--- a/mkinitfs.in
+++ b/mkinitfs.in
@@ -5,10 +5,6 @@ sysconfdir=@sysconfdir@
datadir=@datadir@

config="$sysconfdir"/mkinitfs.conf
init="$datadir"/initramfs-init
fstab="$datadir"/fstab
passwd="$datadir"/passwd
group="$datadir"/group

startdir=$PWD

@@ -222,6 +218,10 @@ shift $(( $OPTIND - 1 ))

. $(readlink -f "$config")
[ -n "$myfeatures" ] && features="$myfeatures"
[ -z "$init" ] && init="$datadir"/initramfs-init
[ -z "$fstab" ] && fstab="$datadir"/fstab
[ -z "$passwd" ] && passwd="$datadir"/passwd
[ -z "$group" ] && group="$datadir"/group

if [ -n "$list_features" ]; then
	for dir in $features_dirs; do
-- 
2.21.0.windows.1



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---