File: postinst

package info (click to toggle)
insserv 1.27.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 884 kB
  • sloc: ansic: 5,171; sh: 2,277; perl: 563; makefile: 201
file content (22 lines) | stat: -rw-r--r-- 686 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
set -e

#DEBHELPER#

# When installing insserv (usually via sysvinit-core) on an existing system,
# fix up the rc?.d priorities from the dumb update-rc.d fallback (which uses
# priority 01 for everything).
if [ "$1" = "configure" ] && [ -z "$2" ]; then
    if [ -z "$DPKG_ROOT" ] ; then
        # normal operation
        insserv || true
    else
        # in chrootless installation, provide the path to the chroot
        insserv \
            --path "$DPKG_ROOT/etc/init.d" \
            --override "$DPKG_ROOT/etc/insserv/overrides/" \
            --insserv-dir "$DPKG_ROOT/etc/init.d/" \
            --config "$DPKG_ROOT/etc/insserv.conf" \
            || true
    fi
fi