Refactor: Move default runlevel to configure script.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2015-06-22 15:12:20 +02:00
parent 42f3d4dc79
commit 06a1a3c839
2 changed files with 8 additions and 2 deletions
Vendored
+8
View File
@@ -28,6 +28,7 @@ defaults()
rcsd=${rcsd:="$sysconfdir/$confdir"}
defuser=${defuser:="root"}
defhost=${defhost:="noname"}
runlevel=${runlevel:=2}
debug=${debug:=0}
embedded=${embedded:=0}
inetd=${inetd:=1}
@@ -55,6 +56,7 @@ fi
echo "rcs.d/ directory : $rcsd"
echo "Default username : $defuser"
echo "Default hostname : $defhost"
echo "Default runlevel : $runlevel"
if [ $debug -ne 0 ]; then
echo "Debug : ENABLED"
@@ -115,6 +117,7 @@ usage()
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 " --with-runlevel=LEVEL Runlevel to switch to after bootstrap (S), default: 2"
echo
echo " --enable-embedded Enable embedded defaults, BusBox getty, mdev etc."
echo " --enable-debug Enable debug flags, '-O0, -g'"
@@ -193,6 +196,10 @@ while [ "$*" != "" ]; do
defhost="$arg"
;;
with-runlevel)
runlevel="$arg"
;;
enable-debug)
debug=1
;;
@@ -309,3 +316,4 @@ 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
echo "#define RUNLEVEL $runlevel" >> config.h
-2
View File
@@ -43,14 +43,12 @@
# define GETTY "/sbin/getty -L"
# define GETTY_BUSYBOX /* Tell tty.c about the getty argument order */
# define BAUDRATE 115200
# define RUNLEVEL 2
#else /* Debian/Ubuntu based distributions */
# define CONSOLE "/dev/tty1"
# define SETUP_DEVFS "/sbin/udevd --daemon"
# define GETTY "/sbin/getty -8"
# define GETTY_AGETTY /* Tell tty.c about the getty argument order */
# define BAUDRATE 38400
# define RUNLEVEL 2
# define RANDOMSEED "/var/lib/urandom/random-seed"
# define REMOUNT_ROOTFS_RW
# define HAVE_DBUS