Sophie

Sophie

distrib > Mandriva > 2009.0 > x86_64 > by-pkgid > 8604cbc4d16ebbba706929d8df6004ee > files > 9

nspluginwrapper-1.1.0-7mdv2009.0.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 $?