Sarebbe possibile copiare e incollare il seguente comando di Terminale da /Library/F-Secure/XFENCE (libreria di sistema) a Terminale in modalità Recovery? Avevo provato a copiarlo a mano, ma gli accapo non erano puliti e non sapevo come fare per rispettare tutti quegli spazi. Ma forse gli spazi interlinei non sono importanti? se copiassi tutto di seguito senza accapo funzionerebbe?
Codice: Seleziona tutto
#!/bin/bash
PARTIAL=false
while getopts uc opt
do
case "$opt" in
u) PARTIAL=true
;;
\?) echo "Usage: $0"
exit 1
;;
esac
done
#Checking if integrated
echo "Checking if integrated"
if [ -d /Library/F-Secure/XFENCE/F-Secure\ XFENCE\ Configuration.app ] ; then
echo "/Library/F-Secure/XFENCE/F-Secure\ XFENCE\ Configuration.app exists"
if [ -f /usr/local/f-secure/signal/xfence-disabled-by-uninstaller ] ; then
rm -rf /usr/local/f-secure/signal/xfence-disabled-by-uninstaller
fi
touch /usr/local/f-secure/signal/xfence-uninstall
notifyutil -1 com.f-secure.xfence-uninstall-proceed && touch /usr/local/f-secure/signal/xfence-disabled-by-uninstaller &
notifyutil -p com.f-secure.xfence-uninstall
SECONDS=0
while [ $SECONDS -lt 10 ] && [ ! -f /usr/local/f-secure/signal/xfence-disabled-by-uninstaller ]; do
sleep 1
done
isKextLoaded=$(kextstat |grep com.fsecure.XFENCE)
if [ -n "$isKextLoaded" ] && [ ! -f /usr/local/f-secure/signal/xfence-disabled-by-uninstaller ] ; then
exit 1
fi
else
echo "/Library/F-Secure/XFENCE/F-Secure\ XFENCE\ Configuration.app does not exist"
launchctl unload /Library/LaunchAgents/com.fsecure.XFENCEUserAgent.plist
sudo rm -f /Library/LaunchAgents/com.fsecure.XFENCEUserAgent.plist
sudo killall "F-Secure XFENCE"
fi
echo "Unloading com.fsecure.XFENCEDaemon.plist"
sudo launchctl unload /Library/LaunchDaemons/com.fsecure.XFENCEDaemon.plist
echo "Removing app files"
sudo rm -rf /Library/Extensions/XFENCE.kext
sudo rm -rf /Library/Application\ Support/XFENCE
sudo rm -rf /Applications/F-Secure\ XFENCE\ Configuration.app
sudo rm -f /Library/LaunchDaemons/com.fsecure.XFENCE.plist
sudo rm -f /Library/LaunchDaemons/com.fsecure.XFENCEDaemon.plist
sudo rm -f /Library/LaunchAgents/com.fsecure.XFENCEUpdater.plist
sudo rm -rf /Library/F-Secure/XFENCE
sudo rm -rf /Users/Shared/F-Secure\ XFENCE\ Extras
if ! $PARTIAL ; then
sudo rm -rf /Users/Shared/F-Secure\ XFENCE
fi
echo "Killing XFENCEDaemon"
sudo killall XFENCEDaemon
exit 0
# Do not force unload, allow kext to be unloaded on next reboot
# sudo touch /System/Library/Extensions
# sleep 5
# sudo kextcache -u /
# sync
# sudo kextunload -b com.fsecure.XFENCE