diff options
Diffstat (limited to 'firestarter.install')
-rw-r--r-- | firestarter.install | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/firestarter.install b/firestarter.install new file mode 100644 index 000000000000..9ca5eb107f28 --- /dev/null +++ b/firestarter.install @@ -0,0 +1,55 @@ +post_install() { + cat << EOM + --> This version comes with a system init script now. You have to run the + --> "firestarter" executable from the command line (in an X driven console) + --> first to generate the initial start-up scripts. + --> If you'd like firestarter brought up on system initialization, add + --> firestarter to the DAEMONS line of your /etc/rc.conf (after network) + --> Consider to use gksu to start firestarter, since firestarter has to be + --> used as root to change the settings of you firewall. It is called as + --> "gksu firestarter" + --> and brings it's own menu entry if gksu is installed on the system. + + --> Some autodetection for the messages logfile has been included, the + --> original code looks for /var/log/kernel and /var/log/messages. In this + --> package detection for /var/log/messages.log and /var/log/kernel.log + --> has been added. So metalog, sysklogd and syslog-ng users should be happy, + --> as long as you remove unused log files form the directory. + +EOM + + echo "installing gnome schemas ..." + GCONF_CONFIG_SOURCE=`usr/bin/gconftool-2 --get-default-source` \ + usr/bin/gconftool-2 --makefile-install-rule usr/share/gconf/schemas/firestarter.schemas > /dev/null +} + +pre_upgrade() { + [ ! -d etc/firestarter ] && mkdir -p etc/firestarter + if [ -d opt/gnome/etc/firestarter ] && [ "`find etc/firestarter -type f | wc -l`" = "1" ]; then + mv opt/gnome/etc/firestarter/* etc/firestarter/ + rmdir opt/gnome/etc/firestarter + for file in `find etc/firestarter -type f`; do + sed -e 's|/opt/gnome/bin|/usr/bin|g' -e 's|/opt/gnome||g' -i "${file}" + done + fi + pre_remove +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + echo "unregistering gnome schemas ..." + if [ -f opt/gnome/etc/gconf/schemas/firestarter.schemas ]; then + schema=opt/gnome/etc/gconf/schemas/firestarter.schemas + else + schema=usr/share/gconf/schemas/firestarter.schemas + fi + GCONF_CONFIG_SOURCE=`usr/bin/gconftool-2 --get-default-source` \ + usr/bin/gconftool-2 --makefile-uninstall-rule $schema > /dev/null +} + +op=$1 +shift +$op $* |