summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2020-01-30 16:44:49 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2020-01-30 16:44:49 +0000
commit4e6634208509f5c67b4d5ad449db696b8e4b6c3d (patch)
tree4f3b4d9a738de1678585762219d6965e3ad1ddd2 /src
parent6a1207350d876659296c6aab7cd1063bbb3d0ed1 (diff)
downloads6-linux-init-4e6634208509f5c67b4d5ad449db696b8e4b6c3d.tar.xz
Do not attempt to unmount /run
Diffstat (limited to 'src')
-rw-r--r--src/misc/s6-linux-init-umountall.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/misc/s6-linux-init-umountall.c b/src/misc/s6-linux-init-umountall.c
index 49c9f97..cb5f7d5 100644
--- a/src/misc/s6-linux-init-umountall.c
+++ b/src/misc/s6-linux-init-umountall.c
@@ -10,6 +10,8 @@
#include <skalibs/stralloc.h>
#include <skalibs/skamisc.h>
+#include <s6-linux-init/config.h>
+
#define MAXLINES 99
#define EXCLUDEN 3
@@ -39,7 +41,9 @@ int main (int argc, char const *const *argv)
got[i]++ ;
break ;
}
- if (i < EXCLUDEN && got[i] == 1) continue ;
+ if ((i < EXCLUDEN && got[i] == 1)
+ || !strcmp(p->mnt_dir, S6_LINUX_INIT_TMPFS))
+ continue ;
if (line >= MAXLINES)
strerr_dief1x(100, "too many mount points") ;
mountpoints[line++] = sa.len ;