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:
Tobias Waldekranz authored and Joachim Nilsson committed 2015-09-29 22:38:06 +02:00
1 parent 9491f18972
commit ae15988eb8
2 files changed
+9 -1

No files matched your search

+8 -1
View File
@@ -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);