File: postinst

package info (click to toggle)
sysvinit 2.86.ds1-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 824 kB
  • ctags: 535
  • sloc: ansic: 6,113; sh: 1,578; makefile: 279; perl: 206
file content (50 lines) | stat: -rw-r--r-- 618 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#! /bin/sh
#
# debian.postinst
#
# Version:	debian.postinst  2.85-14  31-Mar-2004  miquels@cistron.nl
#

set -e

case "$1" in
	configure)
		oldver=$2
		;;
	abort-upgrade|abort-remove|abort-deconfigure)
		exit 0
		;;
esac
umask 022

case `uname -s` in
	*FreeBSD)
		INITCTL=/etc/.initctl
		;;
	*)
		INITCTL=/dev/initctl
		;;
esac

#
#	Check /dev/initctl
#
if [ ! -p $INITCTL ]
then
	echo "sysvinit: creating $INITCTL"
	rm -f $INITCTL
	mkfifo -m 600 $INITCTL
fi
rm -f /etc/ioctl.save

if [ ! -f /etc/inittab ]
then
	cp -a /usr/share/sysvinit/inittab /etc/inittab
fi

#
#	Tell init to re-exec itself.
#
init u ||:

exit 0