File: postinst

package info (click to toggle)
nvi 1.79-20
  • links: PTS
  • area: main
  • in suites: woody
  • size: 5,384 kB
  • ctags: 3,767
  • sloc: ansic: 42,491; sh: 1,534; tcl: 1,124; makefile: 784; perl: 240; awk: 24; csh: 13
file content (33 lines) | stat: -rw-r--r-- 1,055 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
#! /bin/sh

# Remove the old view link (nvi-1.34-14, maybe earlier)
# Don't bother the user with it.
update-alternatives --remove view /usr/bin/nvi >/dev/null

update-alternatives --install /usr/bin/ex ex /usr/bin/nex 30 \
  --slave /usr/share/man/man1/ex.1.gz ex.1.gz /usr/share/man/man1/nex.1.gz
update-alternatives --install /usr/bin/vi vi /usr/bin/nvi 30 \
  --slave /usr/share/man/man1/vi.1.gz vi.1.gz /usr/share/man/man1/nvi.1.gz
update-alternatives --install /usr/bin/view view /usr/bin/nview 30 \
  --slave /usr/share/man/man1/view.1.gz view.1.gz /usr/share/man/man1/nview.1.gz

# These are for the generic editor links

update-alternatives --install /usr/bin/editor editor /usr/bin/nvi 19 \
  --slave /usr/share/man/man1/editor.1.gz editor.1.gz /usr/share/man/man1/nvi.1.gz

#
# Add startup links for recovery script
#

if [ $1 = "configure" ] ; then
    update-rc.d nviboot start 70 S . >/dev/null
    # Clean up old init script
    if [ -f /etc/rc.boot/nvi -a -f /etc/init.d/nviboot ] ; then
	rm /etc/rc.boot/nvi
    fi
fi

#DEBHELPER#

exit 0