if [ -x /usr/lib/chromium/chromium-sandbox ]; then
  chmod 4755 /usr/lib/chromium/chromium-sandbox
fi

if [ -x /usr/bin/update-mime-database ]; then
  /usr/bin/update-mime-database /usr/share/mime &> /dev/null
fi

if [ -x /usr/bin/update-desktop-database ]; then
  /usr/bin/update-desktop-database 1> /dev/null 2> /dev/null
fi

if [ -x /usr/bin/gtk-update-icon-cache ]; then
  /usr/bin/gtk-update-icon-cache  -f -q /usr/share/icons/hicolor 1> /dev/null 2> /dev/null
fi

( cd usr/bin ; rm -rf chromium-sandbox )
( cd usr/bin ; ln -sf /usr/lib/chromium/chromium-sandbox chromium-sandbox )
( cd usr/bin ; rm -rf chromium )
( cd usr/bin ; ln -sf /usr/lib/chromium/chromium chromium )
