op_datetime.sh: Only stop / start ntpd if installed
[openpandora.oe.git] / recipes / pandora-system / pandora-scripts / op_datetime.sh
index d704437..2d301af 100644 (file)
@@ -63,14 +63,14 @@ case $mainsel in
   ;;
   "sync")
   (
-  sudo /etc/init.d/ntpd stop
+  test -e /etc/init.d/ntpd && sudo /etc/init.d/ntpd stop
   sudo ntpdate pool.ntp.org
   ) |
        zenity --progress \
        --title="Syncing..." \
        --text="Syncing with time server...\nPlease wait a while..." \
        --pulsate
-  sudo /etc/init.d/ntpd start
+  test -e /etc/init.d/ntpd && sudo /etc/init.d/ntpd start
   ;;
 esac
 done