#!/bin/bash if [ "$UID" != "0" ]; then echo "You need to be root" exit 1 fi if [ "$1" == "--enable" ]; then if [ ! -f /etc/sysconfig/nspluginwrapper ]; then echo USE_NSPLUGINWRAPPER=yes > /etc/sysconfig/nspluginwrapper else if grep -q USE_NSPLUGINWRAPPER /etc/sysconfig/nspluginwrapper; then sed -i 's/USE_NSPLUGINWRAPPER=.*/USE_NSPLUGINWRAPPER=yes/' /etc/sysconfig/nspluginwrapper else echo USE_NSPLUGINWRAPPER=yes >> /etc/sysconfig/nspluginwrapper fi fi /var/lib/rpm/filetriggers/nspluginwrapper.script elif [ "$1" == "--disable" ]; then if [ ! -f /etc/sysconfig/nspluginwrapper ]; then echo USE_NSPLUGINWRAPPER=no > /etc/sysconfig/nspluginwrapper else if grep -q USE_NSPLUGINWRAPPER /etc/sysconfig/nspluginwrapper; then sed -i 's/USE_NSPLUGINWRAPPER=.*/USE_NSPLUGINWRAPPER=no/' /etc/sysconfig/nspluginwrapper else echo USE_NSPLUGINWRAPPER=no >> /etc/sysconfig/nspluginwrapper fi fi nspluginwrapper -a -r elif [ "$1" == "--update" ]; then nspluginwrapper -a -u else echo "Sintax: $0 [--enable|--disable|--update]" exit 1 fi exit $?