mirror of
https://github.com/troglobit/finit.git
synced 2026-11-07 16:01:08 +00: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:
1 parent
9491f18972
commit
ae15988eb8
2 files changed
+9
-1
No files matched your search
@@ -71,6 +71,7 @@ static int banner(void)
|
|||||||
|
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
|
int err;
|
||||||
uev_ctx_t loop;
|
uev_ctx_t loop;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -151,7 +152,13 @@ int main(int argc, char* argv[])
|
|||||||
plugin_run_hooks(HOOK_ROOTFS_UP);
|
plugin_run_hooks(HOOK_ROOTFS_UP);
|
||||||
|
|
||||||
umask(0);
|
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");
|
run("/sbin/swapon -ea");
|
||||||
umask(0022);
|
umask(0022);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user