Fix broken SYSROOT and add it 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 57b167f9aa
commit 36c59e77b4
2 changed files with 13 additions and 1 deletions
Vendored
+12
View File
@@ -53,6 +53,9 @@ result()
echo "FIFO : $fifo"
echo "Config file : $config"
echo "rcs.d/ directory : $rcsd"
if [ x"$sysroot" != x"" ]; then
echo "Swap rootfs to : $sysroot"
fi
echo "Default username : $defuser"
echo "Default hostname : $defhost"
echo "Default runlevel : $runlevel"
@@ -131,6 +134,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-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"
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"
@@ -209,6 +214,10 @@ while [ "$*" != "" ]; do
rcsd="$arg"
;;
with-sysroot)
sysroot="$arg"
;;
with-usename)
defuser="$arg"
;;
@@ -337,6 +346,9 @@ fi
echo "#define FINIT_FIFO \"$fifo\"" >> config.h
echo "#define FINIT_CONF \"$config\"" >> config.h
echo "#define FINIT_RCSD \"$rcsd\"" >> config.h
if [ x"$sysroot" != x"" ]; then
echo "#define SYSROOT \"$sysroot\"" >> config.h
fi
echo "#define PLUGIN_PATH \"$plugindir\"" >> config.h
if [ x"$random" != x"" ]; then
echo "#define RANDOMSEED \"$random\"" >> config.h
+1 -1
View File
@@ -139,7 +139,7 @@ int main(int argc, char* argv[])
run("/bin/mount -n -o remount,rw /");
#endif
#ifdef SYSROOT
run(SYSROOT, "/", NULL, MS_MOVE, NULL);
mount(SYSROOT, "/", NULL, MS_MOVE, NULL);
#endif
_d("Root FS up, calling hooks ...");