mirror of
https://github.com/troglobit/finit.git
synced 2026-10-18 10:59:34 +00:00
run(): add support for logging/redirect
This patch adds support for optional logging of output from all run() commands. For run_interactive() we've opted to log instead of just redirect, meaning output on error is till on console but also in log. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
ef9e9ec786
commit
6fa3aa41df
7 files changed
+97
-57
No files matched your search
@@ -313,16 +313,16 @@ void do_shutdown(shutop_t op)
|
||||
|
||||
/* Unmount any tmpfs before unmounting swap ... */
|
||||
unmount_tmpfs();
|
||||
run("swapoff -e -a");
|
||||
run("swapoff -e -a", "swapoff");
|
||||
|
||||
/* ... unmount remaining regular file systems. */
|
||||
unmount_regular();
|
||||
|
||||
/* We sit on / so we must remount it ro, try all the things! */
|
||||
sync();
|
||||
run("mount -n -o remount,ro -t dummytype dummydev /");
|
||||
run("mount -n -o remount,ro dummydev /");
|
||||
run("mount -n -o remount,ro /");
|
||||
run("mount -n -o remount,ro -t dummytype dummydev /", "mount");
|
||||
run("mount -n -o remount,ro dummydev /", "mount");
|
||||
run("mount -n -o remount,ro /", "mount");
|
||||
|
||||
/* Call mdadm to mark any RAID array(s) as clean before halting. */
|
||||
mdadm_wait();
|
||||
|
||||
Reference in new issue
Block a user