File: iprutils.prerm

package info (click to toggle)
iprutils 2.4.19-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,304 kB
  • sloc: ansic: 27,001; sh: 326; makefile: 88; python: 10
file content (24 lines) | stat: -rw-r--r-- 481 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#! /bin/sh
set -e

#DEBHELPER#

# Stop services conditionally rather than relying on debhelper, in order to
# handle udev activation under systemd.
case $1 in
    remove)
	if [ -d /run/systemd/system ]; then
		deb-systemd-invoke stop \
			iprinit.service iprdump.service iprupdate.service \
			>/dev/null || true
	else
		for script in iprinit iprdump iprupdate; do
			if [ -x "/etc/init.d/$script" ]; then
				invoke-rc.d "$script" stop || exit 1
			fi
		done
	fi
	;;
esac

exit 0