updated on Sat Jan 14 00:11:12 UTC 2012
[aur-mirror.git] / firestarter / firestarter.install
blob9ca5eb107f28fced1d1bdb293632f2e02f64e5b8
1 post_install() {
2   cat << EOM
3   -->  This version comes with a system init script now. You have to run the
4   -->  "firestarter" executable from the command line (in an X driven console)
5   -->  first to generate the initial start-up scripts.
6   -->  If you'd like firestarter brought up on system initialization, add
7   -->  firestarter to the DAEMONS line of your /etc/rc.conf (after network)
8   -->  Consider to use gksu to start firestarter, since firestarter has to be
9   -->  used as root to change the settings of you firewall. It is called as
10   -->    "gksu firestarter"
11   -->  and brings it's own menu entry if gksu is installed on the system.
12   
13   -->  Some autodetection for the messages logfile has been included, the
14   -->  original code looks for /var/log/kernel and /var/log/messages. In this
15   -->  package detection for /var/log/messages.log and /var/log/kernel.log
16   -->  has been added. So metalog, sysklogd and syslog-ng users should be happy,
17   -->  as long as you remove unused log files form the directory.
19 EOM
21   echo "installing gnome schemas ..."
22   GCONF_CONFIG_SOURCE=`usr/bin/gconftool-2 --get-default-source` \
23       usr/bin/gconftool-2 --makefile-install-rule usr/share/gconf/schemas/firestarter.schemas > /dev/null
26 pre_upgrade() {
27   [ ! -d etc/firestarter ] && mkdir -p etc/firestarter
28   if [ -d opt/gnome/etc/firestarter ] && [ "`find etc/firestarter -type f | wc -l`" = "1" ]; then
29     mv opt/gnome/etc/firestarter/* etc/firestarter/
30     rmdir opt/gnome/etc/firestarter
31     for file in `find etc/firestarter -type f`; do
32       sed -e 's|/opt/gnome/bin|/usr/bin|g' -e 's|/opt/gnome||g' -i "${file}"
33     done
34   fi
35   pre_remove
38 post_upgrade() {
39   post_install $1
42 pre_remove() {
43   echo "unregistering gnome schemas ..."
44   if [ -f opt/gnome/etc/gconf/schemas/firestarter.schemas ]; then
45     schema=opt/gnome/etc/gconf/schemas/firestarter.schemas
46   else
47     schema=usr/share/gconf/schemas/firestarter.schemas
48   fi
49     GCONF_CONFIG_SOURCE=`usr/bin/gconftool-2 --get-default-source` \
50       usr/bin/gconftool-2 --makefile-uninstall-rule $schema > /dev/null
53 op=$1
54 shift
55 $op $*