File: diskless-image-simple.preinst

package info (click to toggle)
diskless 0.3.18.0.5
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 772 kB
  • ctags: 119
  • sloc: perl: 2,628; xml: 782; sh: 439; makefile: 103
file content (35 lines) | stat: -rw-r--r-- 1,064 bytes parent folder | download | duplicates (3)
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
#!/bin/sh -e

warn() {
	cat <<@EOF

              DISKLESS IMAGE 1.3 INSTALLATION ERROR

You are attempting to install the diskless image package onto a
filesystem that doesn't look like a diskless NFS-root image. This could
result in your computer being unable to boot, because this package is
only designed for a specific purpose. In particular, installing
this package could break your /sbin/init daemon.

It is not intended that this package ever be manually installed. Rather,
the diskless-newimage script, contained in the diskless package should
be used. If you have used this script, but still get this message, then
you have found a bug. Please report it.

Aborting installation...
@EOF
	exit 1
}

if [ ! -d /etc/diskless-image ]; then
	warn
fi
   
#DEBHELPER#

#if [ install = "$1" ]; then
    dpkg-divert --package diskless-image-simple --add --rename \
                --divert /sbin/init.orig /sbin/init
    dpkg-divert --package diskless-image-simple --add --rename \
                --divert /usr/man/man8/init.orig.8.gz /usr/man/man8/init.8.gz
#fi