Sophie

Sophie

distrib > Mageia > 1 > i586 > media > core-updates-src > by-pkgid > 9f4a785799562ccf60cf1fe14b281226 > files > 4

nspluginwrapper-1.4.4-1.mga1.src.rpm

#!/bin/sh

if [ ! -f /etc/sysconfig/nspluginwrapper ]; then
    exit
fi

. /etc/sysconfig/nspluginwrapper

if [ "$USE_NSPLUGINWRAPPER" == "no" ]; then
    nspluginwrapper -a -r
    exit $?
fi

# remove all and add them again according to the list
nspluginwrapper -a -r
for plugin in /usr/lib*/mozilla/plugins/*.so /usr/lib/flash-plugin/*.so; do
    # check list of plugins to be wrapped
    skip="1"
    if [ -n "$MDV_PLUGINS" -o -n "$USER_PLUGINS" ]; then
        for bplugin in $(echo "$MDV_PLUGINS,$USER_PLUGINS" | tr ',' ' '); do
            echo $plugin | grep -q $bplugin && skip="0"
        done
    fi
    if [ "$skip" == "0" ]; then
        nspluginwrapper -i $plugin
    fi
done
exit $?