package/finit: wrap custom fstab setting in an advanced sub-menu

Turns out its real easy to get this wrong, ending up with a "" as your
default fstab.  Since this is an advanced option let's mark it as such.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2022-06-13 05:43:05 +02:00
parent 22de57e0dc
commit 2181bda965
2 changed files with 28 additions and 11 deletions
+23 -7
View File
@@ -12,20 +12,36 @@ config BR2_PACKAGE_FINIT
if BR2_PACKAGE_FINIT
config BR2_PACKAGE_FINIT_ADVANCED
bool "Advanced options"
default n
help
Take extra care to verify the resulting system behavior when
changing these option(s). They are marked advanced for the
very reason that they may brick your system!
if BR2_PACKAGE_FINIT_ADVANCED
config BR2_PACKAGE_FINIT_CUSTOM_FSTAB
string "Custom /etc/fstab"
default "/etc/fstab"
help
In certain use-cases, e.g., embedded systems with a secondary
partition, or when testing in factory production. Users may
partition, or when testing in factory production, users may
want to mount system partitions from an fstab file other than
/etC/fstab.
/etc/fstab.
This menuconfing setting changes the default fstab Finit looks
for. To select a different at boot time, use kernel command
line option finit.fstab=/etc/fstab.alt, as usual, for command
line options destined for PID 1, remember the -- separator and
put them last.
This setting allows changing the default fstab Finit looks for.
It can be set to any file in fstab format, even the emtpy string
in case you do not want a default fstab.
To select a different fstab at boot time, use the following kernel
command line option. Remeber the -- separator for kernel options
and options destined for PID 1.
finit.fstab=/etc/fstab.alt
endif
config BR2_PACKAGE_FINIT_INITCTL_GROUP
string "Group for /run/finit/socket"
+5 -4
View File
@@ -33,11 +33,12 @@ FINIT_CONF_OPTS = \
--disable-silent-rules \
--with-group=$(BR2_PACKAGE_FINIT_INITCTL_GROUP)
# Disable/Enable features
ifeq ($(BR2_PACKAGE_FINIT_CUSTOM_FSTAB),)
FINIT_CONF_OPTS += --with-fstab=yes
else
ifeq ($(BR2_PACKAGE_FINIT_ADVANCED),y)
ifneq ($(BR2_PACKAGE_FINIT_CUSTOM_FSTAB),)
FINIT_CONF_OPTS += --with-fstab=$(BR2_PACKAGE_FINIT_CUSTOM_FSTAB)
else
FINIT_CONF_OPTS += --without-fstab
endif
endif
ifeq ($(BR2_PACKAGE_FINIT_KEVENTD),y)