1 |
This way if things crash, we don't leak mounts that need cleaning up. |
2 |
--- |
3 |
tools/catalyst-auto | 8 ++++++++ |
4 |
1 file changed, 8 insertions(+) |
5 |
|
6 |
diff --git a/tools/catalyst-auto b/tools/catalyst-auto |
7 |
index c4c6aa6..c4796a1 100755 |
8 |
--- a/tools/catalyst-auto |
9 |
+++ b/tools/catalyst-auto |
10 |
@@ -1,5 +1,13 @@ |
11 |
#!/bin/bash |
12 |
|
13 |
+# First let's get our own mount namespace to avoid leaking crap. |
14 |
+if [[ -z ${UNSHARE} ]] ; then |
15 |
+ if type -P unshare >&/dev/null ; then |
16 |
+ UNSHARE=true exec unshare -m -- "$0" "$@" |
17 |
+ fi |
18 |
+fi |
19 |
+unset UNSHARE |
20 |
+ |
21 |
PID=$$ |
22 |
|
23 |
config_file= |
24 |
-- |
25 |
1.8.4.3 |