mirror of
https://github.com/troglobit/finit.git
synced 2026-11-08 16:11:10 +00:00
Refactor: Move default runlevel to configure script.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
42f3d4dc79
commit
06a1a3c839
2 files changed
+8
-2
No files matched your search
@@ -28,6 +28,7 @@ defaults()
|
|||||||
rcsd=${rcsd:="$sysconfdir/$confdir"}
|
rcsd=${rcsd:="$sysconfdir/$confdir"}
|
||||||
defuser=${defuser:="root"}
|
defuser=${defuser:="root"}
|
||||||
defhost=${defhost:="noname"}
|
defhost=${defhost:="noname"}
|
||||||
|
runlevel=${runlevel:=2}
|
||||||
debug=${debug:=0}
|
debug=${debug:=0}
|
||||||
embedded=${embedded:=0}
|
embedded=${embedded:=0}
|
||||||
inetd=${inetd:=1}
|
inetd=${inetd:=1}
|
||||||
@@ -55,6 +56,7 @@ fi
|
|||||||
echo "rcs.d/ directory : $rcsd"
|
echo "rcs.d/ directory : $rcsd"
|
||||||
echo "Default username : $defuser"
|
echo "Default username : $defuser"
|
||||||
echo "Default hostname : $defhost"
|
echo "Default hostname : $defhost"
|
||||||
|
echo "Default runlevel : $runlevel"
|
||||||
|
|
||||||
if [ $debug -ne 0 ]; then
|
if [ $debug -ne 0 ]; then
|
||||||
echo "Debug : ENABLED"
|
echo "Debug : ENABLED"
|
||||||
@@ -115,6 +117,7 @@ usage()
|
|||||||
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-username=USER User for 'startx' .conf option, default: root"
|
||||||
echo " --with-hostname=NAME Hostname, if /etc/hostname is missing, default: noname"
|
echo " --with-hostname=NAME Hostname, if /etc/hostname is missing, default: noname"
|
||||||
|
echo " --with-runlevel=LEVEL Runlevel to switch to after bootstrap (S), default: 2"
|
||||||
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'"
|
||||||
@@ -193,6 +196,10 @@ while [ "$*" != "" ]; do
|
|||||||
defhost="$arg"
|
defhost="$arg"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
with-runlevel)
|
||||||
|
runlevel="$arg"
|
||||||
|
;;
|
||||||
|
|
||||||
enable-debug)
|
enable-debug)
|
||||||
debug=1
|
debug=1
|
||||||
;;
|
;;
|
||||||
@@ -309,3 +316,4 @@ 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 DEFUSER \"$defuser\"" >> config.h
|
||||||
echo "#define DEFHOST \"$defhost\"" >> config.h
|
echo "#define DEFHOST \"$defhost\"" >> config.h
|
||||||
|
echo "#define RUNLEVEL $runlevel" >> config.h
|
||||||
@@ -43,14 +43,12 @@
|
|||||||
# define GETTY "/sbin/getty -L"
|
# define GETTY "/sbin/getty -L"
|
||||||
# define GETTY_BUSYBOX /* Tell tty.c about the getty argument order */
|
# define GETTY_BUSYBOX /* Tell tty.c about the getty argument order */
|
||||||
# define BAUDRATE 115200
|
# define BAUDRATE 115200
|
||||||
# define RUNLEVEL 2
|
|
||||||
#else /* Debian/Ubuntu based distributions */
|
#else /* Debian/Ubuntu based distributions */
|
||||||
# define CONSOLE "/dev/tty1"
|
# define CONSOLE "/dev/tty1"
|
||||||
# define SETUP_DEVFS "/sbin/udevd --daemon"
|
# define SETUP_DEVFS "/sbin/udevd --daemon"
|
||||||
# define GETTY "/sbin/getty -8"
|
# define GETTY "/sbin/getty -8"
|
||||||
# define GETTY_AGETTY /* Tell tty.c about the getty argument order */
|
# define GETTY_AGETTY /* Tell tty.c about the getty argument order */
|
||||||
# define BAUDRATE 38400
|
# define BAUDRATE 38400
|
||||||
# define RUNLEVEL 2
|
|
||||||
# define RANDOMSEED "/var/lib/urandom/random-seed"
|
# define RANDOMSEED "/var/lib/urandom/random-seed"
|
||||||
# define REMOUNT_ROOTFS_RW
|
# define REMOUNT_ROOTFS_RW
|
||||||
# define HAVE_DBUS
|
# define HAVE_DBUS
|
||||||
|
|||||||
Reference in new issue
Block a user