ubase

suckless linux base utils
git clone git://git.2f30.org/ubase.git
Log | Files | Refs | README | LICENSE

commit 14716af4723e94913dfaf4516b975db1a764b5e8
parent bea831d2e6356833dc8990d97db974526a007018
Author: sin <sin@2f30.org>
Date:   Wed Mar 12 16:35:20 +0200

Don't umount proc in umount -a

Diffstat:
umount.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/umount.c b/umount.c @@ -2,6 +2,7 @@ #include <mntent.h> #include <stdio.h> #include <stdlib.h> +#include <string.h> #include <sys/mount.h> #include "util.h" @@ -47,6 +48,8 @@ main(int argc, char *argv[]) if (!fp) eprintf("setmntent %s:", "/etc/mtab"); while ((me = getmntent(fp))) { + if (strcmp(me->mnt_type, "proc") == 0) + continue; if (umount2(me->mnt_dir, flags) < 0) { weprintf("umount2:"); ret = EXIT_FAILURE;