summaryrefslogtreecommitdiff
path: root/jaildaemon.sh
diff options
context:
space:
mode:
authorerdgeist <>2013-03-01 23:00:32 +0000
committererdgeist <>2013-03-01 23:00:32 +0000
commit1581102195ece168cc6b3c862ec3cc19fbb8f906 (patch)
treec2e3dba05e5ca8e8431bb5f550ac0d4917fc99ae /jaildaemon.sh
Kickoff
Diffstat (limited to 'jaildaemon.sh')
-rwxr-xr-xjaildaemon.sh36
1 files changed, 36 insertions, 0 deletions
diff --git a/jaildaemon.sh b/jaildaemon.sh
new file mode 100755
index 0000000..0741c23
--- /dev/null
+++ b/jaildaemon.sh
@@ -0,0 +1,36 @@
1#!/bin/sh
2
3echo Need a running jail with jid 1 for this test. Enter to proceed
4read a
5
6killall jaildaemon
7./jaildaemon -D
8
9# daemon comes back too fast, so uds is not yet open
10sleep 1
11./jaildaemon -j 1 -c '/usr/bin/touch /foo' -t Schnupsi -r
12
13echo -n "Killing (respawnin) task: "
14pgrep -f Schnupsi
15
16pkill -HUP -f Schnupsi
17
18echo "Yielding file, touched by task:"
19ls -al /foo
20
21echo "Deleting file"
22rm -r /foo
23
24echo
25echo -n "New task id: "
26pgrep -f Schnupsi
27
28echo "Killing with normal signal:"
29
30pkill -f Schnupsi
31
32echo "Expecting no file here:"
33ls -al /foo
34
35echo "Also expecting no command to match:"
36pgrep -f Schnupsi