mirror of
https://github.com/troglobit/finit.git
synced 2026-11-12 16:51:25 +00:00
Refactor: Move DEFUSER and DEFHOST to configure script
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
8e12dba8d9
commit
42f3d4dc79
2 files changed
+17
-9
No files matched your search
@@ -26,6 +26,8 @@ defaults()
|
|||||||
config=${config:="$sysconfdir/$conf"}
|
config=${config:="$sysconfdir/$conf"}
|
||||||
confdir=${confdir:="finit.d"}
|
confdir=${confdir:="finit.d"}
|
||||||
rcsd=${rcsd:="$sysconfdir/$confdir"}
|
rcsd=${rcsd:="$sysconfdir/$confdir"}
|
||||||
|
defuser=${defuser:="root"}
|
||||||
|
defhost=${defhost:="noname"}
|
||||||
debug=${debug:=0}
|
debug=${debug:=0}
|
||||||
embedded=${embedded:=0}
|
embedded=${embedded:=0}
|
||||||
inetd=${inetd:=1}
|
inetd=${inetd:=1}
|
||||||
@@ -51,6 +53,9 @@ fi
|
|||||||
echo "FIFO : $fifo"
|
echo "FIFO : $fifo"
|
||||||
echo "Config file : $config"
|
echo "Config file : $config"
|
||||||
echo "rcs.d/ directory : $rcsd"
|
echo "rcs.d/ directory : $rcsd"
|
||||||
|
echo "Default username : $defuser"
|
||||||
|
echo "Default hostname : $defhost"
|
||||||
|
|
||||||
if [ $debug -ne 0 ]; then
|
if [ $debug -ne 0 ]; then
|
||||||
echo "Debug : ENABLED"
|
echo "Debug : ENABLED"
|
||||||
fi
|
fi
|
||||||
@@ -108,6 +113,8 @@ usage()
|
|||||||
echo " files, or as built-in if --enable-static is given,"
|
echo " files, or as built-in if --enable-static is given,"
|
||||||
echo " defaults to all plugins. Exclude extension!"
|
echo " defaults to all plugins. Exclude extension!"
|
||||||
echo " --with-rcsd=RCSD Finit RCSD directory, default '\$sysconfdir/$confdir'"
|
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
|
||||||
echo " --enable-embedded Enable embedded defaults, BusBox getty, mdev etc."
|
echo " --enable-embedded Enable embedded defaults, BusBox getty, mdev etc."
|
||||||
echo " --enable-debug Enable debug flags, '-O0, -g'"
|
echo " --enable-debug Enable debug flags, '-O0, -g'"
|
||||||
@@ -178,6 +185,14 @@ while [ "$*" != "" ]; do
|
|||||||
rcsd="$arg"
|
rcsd="$arg"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
with-usename)
|
||||||
|
defuser="$arg"
|
||||||
|
;;
|
||||||
|
|
||||||
|
with-hostname)
|
||||||
|
defhost="$arg"
|
||||||
|
;;
|
||||||
|
|
||||||
enable-debug)
|
enable-debug)
|
||||||
debug=1
|
debug=1
|
||||||
;;
|
;;
|
||||||
@@ -292,5 +307,5 @@ echo "#define FINIT_FIFO \"$fifo\"" >> config.h
|
|||||||
echo "#define FINIT_CONF \"$config\"" >> config.h
|
echo "#define FINIT_CONF \"$config\"" >> config.h
|
||||||
echo "#define FINIT_RCSD \"$rcsd\"" >> config.h
|
echo "#define FINIT_RCSD \"$rcsd\"" >> config.h
|
||||||
echo "#define PLUGIN_PATH \"$plugindir\"" >> config.h
|
echo "#define PLUGIN_PATH \"$plugindir\"" >> config.h
|
||||||
|
echo "#define DEFUSER \"$defuser\"" >> config.h
|
||||||
|
echo "#define DEFHOST \"$defhost\"" >> config.h
|
||||||
@@ -62,13 +62,6 @@
|
|||||||
# define FALLBACK_SHELL _PATH_BSHELL
|
# define FALLBACK_SHELL _PATH_BSHELL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef DEFUSER
|
|
||||||
# define DEFUSER "root"
|
|
||||||
#endif
|
|
||||||
#ifndef DEFHOST
|
|
||||||
# define DEFHOST "noname"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define CMD_SIZE 256
|
#define CMD_SIZE 256
|
||||||
#define LINE_SIZE 1024
|
#define LINE_SIZE 1024
|
||||||
#define BUF_SIZE 4096
|
#define BUF_SIZE 4096
|
||||||
|
|||||||
Reference in new issue
Block a user