summaryrefslogtreecommitdiff
path: root/preinst-runit
diff options
context:
space:
mode:
Diffstat (limited to 'preinst-runit')
-rw-r--r--preinst-runit19
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 -*-
2SV_ABS_DIR=/var/lib/runit/service
3SV_DIR=/etc/service
4mkdir -p "$SV_ABS_DIR"
5if [ ! -e "$SV_DIR" ] ; then
6 ln -s "$SV_ABS_DIR" "$SV_DIR"
7fi
8
9if [ "$(readlink -f "$SV_DIR")" != "$SV_ABS_DIR" ] ; then
10 cat <<EOF
11Service directory '$SV_DIR' exists, but is not symbolic link
12to '$SV_ABS_DIR'. It probably means that it was created by
13hand or versions of runit below 2.1.2-4.
14
15In either case, please remove service directory yourself and
16restart installation.
17EOF
18 exit 1
19fi