Wind River Support Network

HomeDefectsLIN6-3830
Fixed

LIN6-3830 : wrlinux 5.0.1 - /etc/init.d/ntpd errors

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

Description

$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)

Steps to Reproduce

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


Live chat
Online