summaryrefslogtreecommitdiff
path: root/preinst-runit
blob: 19f959bd4159b4d7a650019edb78d0802696bae9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# -*- shell-script -*-
SV_ABS_DIR=/var/lib/runit/service
SV_DIR=/etc/service
mkdir -p "$SV_ABS_DIR"
if [ ! -e "$SV_DIR" ] ; then
    ln -s "$SV_ABS_DIR" "$SV_DIR"
fi

if [ "$(readlink -f "$SV_DIR")" != "$SV_ABS_DIR" ] ; then
    cat <<EOF
Service directory '$SV_DIR' exists, but is not symbolic link
to '$SV_ABS_DIR'. It probably means that it was created by
hand or versions of runit below 2.1.2-4.

In either case, please remove service directory yourself and
restart installation.
EOF
    exit 1
fi

# Local Variables:
# eval: (sh-set-shell "sh" t nil)
# End: