File: postinst

package info (click to toggle)
wanpipe 2.1.1-2.1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,348 kB
  • ctags: 713
  • sloc: ansic: 6,182; sh: 2,522; cpp: 2,488; makefile: 116
file content (30 lines) | stat: -rw-r--r-- 895 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
23
24
25
26
27
28
29
30
#!/bin/sh
#
# postinst wanpipe
# 981001	added code to clean up old conffiles
# 19990514/tm	no restart on upgrade
# 20000115/tm	update for wanpipe_2.1.1
#		- removed old conffile cleanup
#		- added conffile link
#######################################################
#set -o errexit

if [ "$1" = "configure" ]; then
   if [ -d /usr/doc -a ! -e /usr/doc/wanpipe -a -d /usr/share/doc/wanpipe ]; then
      ln -sf ../share/doc/wanpipe /usr/doc/wanpipe
   fi
   
   # /usr/sbin/wanpipe now expects conffile to have a different name
   if [ -f /etc/wanpipe/router.conf -a ! -f /etc/wanpipe/wanpipe1.conf ]
   then
      cd /etc/wanpipe ; ln -sf router.conf wanpipe1.conf
   fi
fi

# update startup/shutdown script links
update-rc.d wanpipe start 14 2 3 4 5 . stop 10 0 1 6 . >/dev/null

# re-enable starts/stops
[ -f /var/lock/wanpipe_upgrade ] && rm -f /var/lock/wanpipe_upgrade 2>/dev/null

exit 0