Fixed
Created: Jul 4, 2013
Updated: Mar 5, 2016
Resolved Date: Dec 4, 2013
Previous ID: LIN5-3532, LIN6-3045
Found In Version: 6.0
Fix Version: 6.0
Severity: Severe
Applicable for: Wind River Linux 6
Component/s: Userspace
$PATH should be set in /etc/init.d/ntpd, because otherwise, if this script is being called by a non-root user using sudo, it will fail as follows:
/etc/init.d/ntpd restart
Stopping ntpd: /etc/init.d/ntpd: line 29: start-stop-daemon: command not found
done
Starting ntpd: /etc/init.d/ntpd: line 24: start-stop-daemon: command not found
done
root cause: the script /etc/init.d/ntpd calls start-stop-daemon which is in /sbin (not in the default path for non-root users)
configure a wrlinux 5.0.1. project (any rootfs type is ok as long as it has ntp included)
boot the target
create a new user
reboot & login with the new user
run /etc/init.d/ntpd restart