
##############################################################################################################
# now files are saved off from gnc
if false; then

# disable firefox extension installation in response to firesheep
# TODO: make this configurable in pac.conf

#JSFILE=/usr/lib/firefox-$FFVERSION/defaults/pref/groovix-locked-prefs.js
#CFGFILE=/usr/lib/firefox-$FFVERSION/groovix-locked-prefs.cfg
#after firefox 12 path no longer uses version
JSFILE=/usr/lib/firefox/defaults/pref/groovix-locked-prefs.js
CFGFILE=/usr/lib/firefox/groovix-locked-prefs.cfg

#the first line in these files must be a blank comment or they won't load!
echo "\\\\" > $JSFILE
echo "\\\\" > $CFGFILE
#echo "\\\\ the first line in this file must be a blank comment" >> $JSFILE
#echo "\\\\ the first line in this file must be a blank comment" >> $CFGFILE

ffprefset.pl pref general.config.obscure_value 0 $JSFILE
ffprefset.pl pref general.config.filename "\"groovix-locked-prefs.cfg\"" $JSFILE

ffprefset.pl lockPref xpinstall.enabled false $CFGFILE

fi

if false; then
#disable this old method
if [ -n "$GX_SITE_WHITELIST" ] ; then
        if [ -z "$GX_SITE_WHITELIST_DEST" ] ; then
                GX_SITE_WHITELIST_DEST="This machine is a kiosk"
        fi

        ffprefset.pl lockPref network.proxy.type "1" $CFGFILE
        ffprefset.pl lockPref network.proxy.no_proxies_on "\"$GX_SITE_WHITELIST\"" $CFGFILE
        ffprefset.pl lockPref network.proxy.share_proxy_settings true $CFGFILE
        for PROTOCOL in http ssl ftp gopher socks ; do
                ffprefset.pl lockPref network.proxy.${PROTOCOL} "\"$GX_SITE_WHITELIST_DEST\"" $CFGFILE
                ffprefset.pl lockPref network.proxy.${PROTOCOL}_port "80" $CFGFILE
        done
else
        # lock proxy to no proxy to prevent mischief
        # this also servers to turn OFF the whitelist if GX_SITE_WHITELIST is changed to unset in pac.conf
        ffprefset.pl lockPref network.proxy.type "0" $CFGFILE
fi
fi
##############################################################################################################

##############################################################################################################
if false; then
#disable these old methods
#for firefox-kiosk-mode
if [ -z "$PAC_BROWSER_STARTUP_HOMEPAGE" ] ; then
        echo "PAC_BROWSER_STARTUP_HOMEPAGE not set"
else
        #for F in /usr/lib/firefox*/gkiosk.cfg ; do
                if [ -e /usr/lib/firefox-template-X.Y.Z/gkiosk.cfg ] ; then
                        ffprefset.pl lockPref browser.startup.homepage "\"$PAC_BROWSER_STARTUP_HOMEPAGE\"" /usr/lib/firefox-template-X.Y.Z/gkiosk.cfg
                        ffprefset.pl lockPref startup.homepage_override_url "\"$PAC_BROWSER_STARTUP_HOMEPAGE\"" /usr/lib/firefox-template-X.Y.Z/gkiosk.cfg
                fi
        #done

        #for F in /etc/firefox*/profile/prefs.js ; do
                if [ -e /usr/lib/firefox-template-X.Y.Z/profile/ ] ; then
                        ffprefset.pl user_pref  browser.startup.homepage "\"$PAC_BROWSER_STARTUP_HOMEPAGE\"" /usr/lib/firefox-template-X.Y.Z/profile/prefs.js
                        ffprefset.pl user_pref  startup.homepage_override_url "\"$PAC_BROWSER_STARTUP_HOMEPAGE\"" /usr/lib/firefox-template-X.Y.Z/profile/prefs.js
                fi
        #done
fi

if [ -e /usr/lib/firefox-template-X.Y.Z/gkiosk.cfg ] || [ -e /usr/lib/firefox-template-X.Y.Z/profile/ ] ; then
        #apply to all dirs
        for F in /usr/lib/firefox-?.* ; do
                cp -rp /usr/lib/firefox-template-X.Y.Z/* $F/
        done
fi
fi

##############################################################################################################

