Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release-src > by-pkgid > a484a855f266cae4e809c9e19f47ad93 > files > 9

nspluginwrapper-1.4.4-8.mga5.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"

    # don't wrap $MGA_PLUGINS on 32-bit
    [ "$(arch)" = "x86_64" ] || MGA_PLUGINS=

    if [ -n "$MGA_PLUGINS" -o -n "$USER_PLUGINS" ]; then
        for bplugin in $(echo "$MGA_PLUGINS,$USER_PLUGINS" | tr ',' ' '); do
            echo $plugin | grep -q $bplugin && skip="0"
        done
    fi
    if [ "$skip" == "0" ]; then
        nspluginwrapper -i $plugin
    fi
done
exit $?