Make it possible to distribute finit.h in 'make dev-install'

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2015-06-22 15:12:20 +02:00
1 parent 9a6ab331a6
commit f1807a32ca
9 files changed
+21 -9

No files matched your search

Vendored
+8
View File
@@ -27,6 +27,7 @@ defaults()
confdir=${confdir:="finit.d"}
rcsd=${rcsd:="$sysconfdir/$confdir"}
console=${console:='_PATH_CONSOLE'}
shell=${shell:='_PATH_BSHELL'}
defuser=${defuser:="root"}
defhost=${defhost:="noname"}
runlevel=${runlevel:=2}
@@ -56,6 +57,7 @@ result()
echo "Config file : $config"
echo "rcs.d/ directory : $rcsd"
echo "Default console : $console"
# echo "Fallback shell : $shell"
if [ x"$sysroot" != x"" ]; then
echo "Swap rootfs to : $sysroot"
fi
@@ -143,6 +145,7 @@ usage()
echo " defaults to all plugins. Exclude extension!"
echo " --with-rcsd=RCSD Finit RCSD directory, default '\$sysconfdir/$confdir'"
echo " --with-console=DEV Console to use, default: /dev/console"
# echo " --with-shell=PATH Fallback shell to use, default: /bin/sh"
echo " --with-sysroot=PATH Some distributions keep a different (writable) rootfs"
echo " that is used at runtime, usually /sysroot or /mnt"
echo " --with-username=USER User for 'startx' .conf option, default: root"
@@ -228,6 +231,10 @@ while [ "$*" != "" ]; do
console="\"$arg\""
;;
with-shell)
shell="\"$arg\""
;;
with-sysroot)
sysroot="$arg"
;;
@@ -380,6 +387,7 @@ echo "#define FINIT_FIFO \"$fifo\"" >> config.h
echo "#define FINIT_CONF \"$config\"" >> config.h
echo "#define FINIT_RCSD \"$rcsd\"" >> config.h
echo "#define CONSOLE $console" >> config.h
echo "#define FALLBACK_SHELL $shell" >> config.h
if [ x"$sysroot" != x"" ]; then
echo "#define SYSROOT \"$sysroot\"" >> config.h
fi