#!/bin/sh
ln -s /opt/maemo/usr/lib/hildon-desktop/advifswlib /usr/lib/hildon-desktop/advifswlib
update-sudoers
chmod +x /usr/bin/advifsw_wlan_off.sh
chmod +x /usr/bin/advifsw_wlan_on.sh
gtk-update-icon-cache -f /usr/share/icons/hicolor

DISABLED_DIR=/usr/share/applications/hildon-status-menu/disabled
if [ ! -d $DISABLED_DIR ]
then
  mkdir $DISABLED_DIR
fi

if [ -f $DISABLED_DIR/../connui-bluetooth.desktop ]
then
  mv $DISABLED_DIR/../connui-bluetooth.desktop $DISABLED_DIR/
fi

PLUGINS_CONFIG=/etc/hildon-desktop/status-menu.plugins
sed -i 's/connui-bluetooth\.desktop/advanced-interface-switcher\.desktop/g' $PLUGINS_CONFIG
exit 0
