~ubuntu-branches/ubuntu/trusty/iscsitarget/trusty

« back to all changes in this revision

Viewing changes to debian/iscsitarget.postinst

  • Committer: Colin Watson
  • Date: 2010-08-16 20:59:52 UTC
  • mfrom: (2.1.9 sid)
  • Revision ID: cjwatson@canonical.com-20100816205952-hyytf817ju6wk1bj
merge from Debian 1.4.20.2-1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
set -e
 
4
 
 
5
case "$1" in
 
6
  configure)
 
7
        if [ -f /etc/ietd.conf ]; then
 
8
                mv -f /etc/ietd.conf /etc/iet/
 
9
                echo "Moving config /etc/ietd.conf to new location /etc/iet/"
 
10
        fi
 
11
 
 
12
        if [ -f /etc/initiators.allow ]; then
 
13
                mv -f /etc/initiators.allow /etc/iet/
 
14
                echo "Moving config /etc/initiators.allow to new location /etc/iet/"
 
15
        fi
 
16
 
 
17
        if [ -f /etc/initiators.deny ]; then
 
18
                mv -f /etc/initiators.deny /etc/iet/
 
19
                echo "Moving config /etc/initiators.deny to new location /etc/iet/"
 
20
        fi
 
21
 
 
22
        # Clean up the mess created in the last upload, 1.4.20.1-2
 
23
        if [ -d /etc/ietd ]; then
 
24
                if [ -f /etc/ietd/ietd.conf ]; then
 
25
                        mv -f /etc/ietd/ietd.conf /etc/iet/
 
26
                fi
 
27
                if [ -f /etc/ietd/initiators.allow ]; then
 
28
                        mv -f /etc/ietd/initiators.allow /etc/iet/
 
29
                fi
 
30
                if [ -f /etc/ietd/initiators.deny ]; then
 
31
                        mv -f /etc/ietd/initiators.deny /etc/iet/
 
32
                fi
 
33
                rm -rf /etc/ietd/
 
34
        fi
 
35
  ;;
 
36
  abort-upgrade|abort-remove|abort-deconfigure|triggered)
 
37
  ;;
 
38
  *)
 
39
    echo "postinst called with unknown argument \`$1'" >&2
 
40
    exit 1;
 
41
  ;;
 
42
esac
 
43
 
 
44
 
 
45
#DEBHELPER#
 
46
 
 
47
exit 0