mirror of
https://github.com/troglobit/finit.git
synced 2026-10-11 17:02:42 +07:00
Refactor: Move DEFUSER and DEFHOST to configure script
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
@@ -26,6 +26,8 @@ defaults()
|
||||
config=${config:="$sysconfdir/$conf"}
|
||||
confdir=${confdir:="finit.d"}
|
||||
rcsd=${rcsd:="$sysconfdir/$confdir"}
|
||||
defuser=${defuser:="root"}
|
||||
defhost=${defhost:="noname"}
|
||||
debug=${debug:=0}
|
||||
embedded=${embedded:=0}
|
||||
inetd=${inetd:=1}
|
||||
@@ -51,6 +53,9 @@ fi
|
||||
echo "FIFO : $fifo"
|
||||
echo "Config file : $config"
|
||||
echo "rcs.d/ directory : $rcsd"
|
||||
echo "Default username : $defuser"
|
||||
echo "Default hostname : $defhost"
|
||||
|
||||
if [ $debug -ne 0 ]; then
|
||||
echo "Debug : ENABLED"
|
||||
fi
|
||||
@@ -108,6 +113,8 @@ usage()
|
||||
echo " files, or as built-in if --enable-static is given,"
|
||||
echo " defaults to all plugins. Exclude extension!"
|
||||
echo " --with-rcsd=RCSD Finit RCSD directory, default '\$sysconfdir/$confdir'"
|
||||
echo " --with-username=USER User for 'startx' .conf option, default: root"
|
||||
echo " --with-hostname=NAME Hostname, if /etc/hostname is missing, default: noname"
|
||||
echo
|
||||
echo " --enable-embedded Enable embedded defaults, BusBox getty, mdev etc."
|
||||
echo " --enable-debug Enable debug flags, '-O0, -g'"
|
||||
@@ -178,6 +185,14 @@ while [ "$*" != "" ]; do
|
||||
rcsd="$arg"
|
||||
;;
|
||||
|
||||
with-usename)
|
||||
defuser="$arg"
|
||||
;;
|
||||
|
||||
with-hostname)
|
||||
defhost="$arg"
|
||||
;;
|
||||
|
||||
enable-debug)
|
||||
debug=1
|
||||
;;
|
||||
@@ -292,5 +307,5 @@ echo "#define FINIT_FIFO \"$fifo\"" >> config.h
|
||||
echo "#define FINIT_CONF \"$config\"" >> config.h
|
||||
echo "#define FINIT_RCSD \"$rcsd\"" >> config.h
|
||||
echo "#define PLUGIN_PATH \"$plugindir\"" >> config.h
|
||||
|
||||
|
||||
echo "#define DEFUSER \"$defuser\"" >> config.h
|
||||
echo "#define DEFHOST \"$defhost\"" >> config.h
|
||||
|
||||
Reference in New Issue
Block a user