mirror of
https://github.com/troglobit/finit.git
synced 2026-10-01 13:33:09 +07:00
Add hook point on fstab mount failure
Check return code from `mount -na`, if there where any errors give plugins a chance to do something about it. Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com> Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
committed by
Joachim Nilsson
parent
9491f18972
commit
ae15988eb8
@@ -71,6 +71,7 @@ static int banner(void)
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
int err;
|
||||
uev_ctx_t loop;
|
||||
|
||||
/*
|
||||
@@ -151,7 +152,13 @@ int main(int argc, char* argv[])
|
||||
plugin_run_hooks(HOOK_ROOTFS_UP);
|
||||
|
||||
umask(0);
|
||||
run("/bin/mount -na");
|
||||
print_desc("Mounting filesystems", NULL);
|
||||
|
||||
err = run("/bin/mount -na");
|
||||
print_result(err);
|
||||
if (err)
|
||||
plugin_run_hooks(HOOK_MOUNT_ERROR);
|
||||
|
||||
run("/sbin/swapon -ea");
|
||||
umask(0022);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user