Defer all filesystem setup to the user via /etc/fstab

Traditionally, Finit has setup _some_ filesystems that are Nice To
Have (tm), using options that do the Right Thing (tm).

On the one hand, this is very convenient for users that don't
necessarily know what a reasonable mode= value is for /tmp etc. (pun
intended).  It also means that mountpoints can be created if they
don't exist.

On the other hand it means that all users are forced to submit to the
choices made by Finit.  Also, different filesystems where spread out
at many different points in `main()`, meaning that the fact that
`/proc` was available at a given hook point did not imply that `/sys`
was, for example.

Instead, defer _all_ filesystem setup to the user by simply calling
`mount -a`.  We then ship an example `fstab` that shows how to
re-create the old behavior.
This commit is contained in:
Tobias Waldekranz committed 2020-10-20 09:31:58 +02:00
1 parent b280c8a16a
commit 4febd288ef
3 files changed
+106 -116

No files matched your search

+6 -1
View File
@@ -201,7 +201,12 @@ void plugin_run_hook(hook_point_t no, void *arg)
}
}
cond_set_oneshot(hook_cond[no]);
/* Conditions are stored in /run, so don't try to signal
* conditions for any hooks before filesystems have been
* mounted. */
if (no >= HOOK_MOUNT_ERROR)
cond_set_oneshot(hook_cond[no]);
service_step_all(SVC_TYPE_RUNTASK);
}