From: Lennart Poettering Date: Tue, 6 Mar 2012 00:28:32 +0000 (+0100) Subject: umount: don't try to umount /usr, if we are running from it X-Git-Tag: v44~65 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=9cacf564513b5fd6078cd418b104083aab8b9bd8 umount: don't try to umount /usr, if we are running from it --- diff --git a/.gitignore b/.gitignore index 3da7e6651..3b69eb46f 100644 --- a/.gitignore +++ b/.gitignore @@ -103,4 +103,6 @@ stamp-* /Makefile ltmain.sh *.tar.xz +*.tar.gz +*.tar.bz2 libtool diff --git a/TODO b/TODO index fbc494ef4..9b6f52692 100644 --- 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 diff --git a/src/umount.c b/src/umount.c index 4e036d82a..0a63d23a0 100644 --- a/src/umount.c +++ b/src/umount.c @@ -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; }