chiark / gitweb /
umount: don't try to umount /usr, if we are running from it
authorLennart Poettering <lennart@poettering.net>
Tue, 6 Mar 2012 00:28:32 +0000 (01:28 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 6 Mar 2012 00:28:32 +0000 (01:28 +0100)
.gitignore
TODO
src/umount.c

index 3da7e66518ecb4e4b6f650d8249929cc4e093059..3b69eb46f983e5925269c48437f41a503918efe7 100644 (file)
@@ -103,4 +103,6 @@ stamp-*
 /Makefile
 ltmain.sh
 *.tar.xz
+*.tar.gz
+*.tar.bz2
 libtool
diff --git a/TODO b/TODO
index fbc494ef417d247916da13649e21f898d1bd3b3d..9b6f526920dd5869f7a5b056f50e3af3bf0c47ed 100644 (file)
--- a/TODO
+++ b/TODO
@@ -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
index 4e036d82a30555988c18fea2c4dc8a8333f4b78c..0a63d23a01bb1b18ea2703237646c60a20792ce0 100644 (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;
                 }