aboutsummaryrefslogtreecommitdiff
path: root/debian/postinst
blob: 71e956d0a7092b13b850e0675762ba15c340cd38 (plain)
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
#!/bin/bash
# $Id: postinst,v 1.1 2004/11/29 10:39:38 ladis Exp $

set -e

# Source debconf library.
. /usr/share/debconf/confmodule

case "$1" in
    configure)
    	db_get arcboot/boot_device || true

	if [ ! -f /etc/arcboot.conf ]; then
	    # create /etc/arcboot.conf
	    ROOTDEVICE=`mount | grep -s '[[:space:]]/[[:space:]]' | cut -d' ' -f 1`

cat << EOF > /etc/arcboot.conf
# arcboot.conf
#
label=linux
  image=/vmlinux
  append="root=$ROOTDEVICE"
EOF
	fi
    	/usr/sbin/arcboot $RET

    ;;

    abort-upgrade|abort-remove|abort-deconfigure)

    ;;

    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 0
    ;;
esac

#DEBHELPER#

exit 0