umount: don't try to umount /usr, if we are running from it

This commit is contained in:
Lennart Poettering 2012-03-06 01:28:32 +01:00
parent 7d900eb6f5
commit 9cacf56451
3 changed files with 9 additions and 3 deletions

2
.gitignore vendored
View File

@ -103,4 +103,6 @@ stamp-*
/Makefile
ltmain.sh
*.tar.xz
*.tar.gz
*.tar.bz2
libtool

4
TODO
View File

@ -21,6 +21,8 @@ Bugfixes:
Features:
* prefer /etc over /run?
* when dumping cgroup contents, include main/control PID of a service, explicitly
* keep an eye on https://bugzilla.gnome.org/show_bug.cgi?id=670100
@ -41,8 +43,6 @@ Features:
* isolate for getty is still broken, due to logind
* don't umount /usr
* default unix qlen is too small (10). bump sysctl? add sockopt?
* support units generated by a generator and placed in /run/systemd/system/; the directory is

View File

@ -410,7 +410,11 @@ static int mount_points_list_umount(MountPoint **head, bool *changed, bool log_e
assert(head);
LIST_FOREACH_SAFE(mount_point, m, n, *head) {
if (streq(m->path, "/")) {
if (path_equal(m->path, "/")
#ifndef HAVE_SPLIT_USR
|| path_equal(m->path, "/usr")
#endif
) {
n_failed++;
continue;
}