File: selinux-basics.postinst

package info (click to toggle)
selinux-basics 0.5.2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 152 kB
  • ctags: 67
  • sloc: python: 280; sh: 220; perl: 43; makefile: 4
file content (29 lines) | stat: -rw-r--r-- 547 bytes parent folder | download | duplicates (4)
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
#!/bin/sh -e

case "$1" in
    configure)
    for n in /boot/grub/menu.lst /etc/default/grub ; do
      if [ -f $n ]; then
        if grep -q selinux=1 $n ; then
          if ! grep -q security=selinux $n ; then
            sed -e "s/selinux=1/selinux=1 security=selinux/" < $n > $n.new
            mv $n.new $n
            update-grub
          fi
        fi
      fi
    done
    ;;

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

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

#DEBHELPER#

exit 0