This file is indexed.

prerm is in open-iscsi 2.0.873+git0.3b4b4500-14ubuntu3.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

The actual contents of the file can be viewed below.

 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/sh
# prerm script for open-iscsi

. /usr/share/debconf/confmodule
set -e

case "$1" in
    remove)
        if ls -d /sys/class/iscsi_session/session* >/dev/null 2>&1 ; then
            # There are still active iSCSI sessions. Ask the user
            # if they know what they are doing.
            db_reset open-iscsi/remove_even_with_active_sessions || true
            db_input critical open-iscsi/remove_even_with_active_sessions || true
            db_go
            db_get open-iscsi/remove_even_with_active_sessions
            if [ "$RET" = "false" ] ; then
                echo "Aborting prerm due to user request." >&2
                exit 1
            fi
        fi

        sync
        # If there are still active and mounted iSCSI sessions,
        # open-iscsi stop may fail. But we did warn the user...
        invoke-rc.d open-iscsi stop || true
        invoke-rc.d iscsid stop || exit $?
    ;;
    
    upgrade)
        if dpkg --compare-versions "$2" le "2.0.873+git0.3b4b4500-9"; then
            # The user is attempting to downgrade, ask them if they
            # really want to do this.
            db_reset open-iscsi/downgrade_and_break_system || true
            db_input critical open-iscsi/downgrade_and_break_system || true
            db_go
            db_get open-iscsi/downgrade_and_break_system
            if [ "$RET" = "false" ] ; then
                echo "Aborting prerm due to user request." >&2
                exit 1
            fi
        fi
    ;;

    deconfigure)
    ;;

    failed-upgrade)
    ;;

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

# Automatically added by dh_installdeb
dpkg-maintscript-helper rm_conffile /etc/init/iscsi-network-interface.conf 2.0.873-3ubuntu12~ -- "$@"
# End automatically added section
# Automatically added by dh_installdeb
dpkg-maintscript-helper rm_conffile /etc/init.d/umountiscsi.sh 2.0.873+git0.3b4b4500-9 -- "$@"
# End automatically added section


exit 0