diff options
Diffstat (limited to 'preinst-runit')
-rw-r--r-- | preinst-runit | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/preinst-runit b/preinst-runit new file mode 100644 index 0000000..eaccc4a --- /dev/null +++ b/preinst-runit | |||
@@ -0,0 +1,19 @@ | |||
1 | #!/bin/sh # -*- shell-script -*- | ||
2 | SV_ABS_DIR=/var/lib/runit/service | ||
3 | SV_DIR=/etc/service | ||
4 | mkdir -p "$SV_ABS_DIR" | ||
5 | if [ ! -e "$SV_DIR" ] ; then | ||
6 | ln -s "$SV_ABS_DIR" "$SV_DIR" | ||
7 | fi | ||
8 | |||
9 | if [ "$(readlink -f "$SV_DIR")" != "$SV_ABS_DIR" ] ; then | ||
10 | cat <<EOF | ||
11 | Service directory '$SV_DIR' exists, but is not symbolic link | ||
12 | to '$SV_ABS_DIR'. It probably means that it was created by | ||
13 | hand or versions of runit below 2.1.2-4. | ||
14 | |||
15 | In either case, please remove service directory yourself and | ||
16 | restart installation. | ||
17 | EOF | ||
18 | exit 1 | ||
19 | fi | ||