Skip to content
Commit 5f8ef9cf authored by Qiang Chen's avatar Qiang Chen Committed by Joe MacDonald
Browse files

ntpd: make start-stop-daemon command available for ntpd



If ntpd 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

This is because /etc/init.d/ntpd calls start-stop-daemon which
is in /sbin (not in the default path for non-root users)

Explicitly configure the PATH to include /sbin.

Signed-off-by: default avatarQiang Chen <qiang.chen@windriver.com>
Signed-off-by: default avatarJeff Polk <jeff.polk@windriver.com>

Reworked to set PATH instead of hardcode the location of start-stop-daemon

Signed-off-by: default avatarMark Hatle <mark.hatle@windriver.com>
Signed-off-by: default avatarJoe MacDonald <joe@deserted.net>
parent ba4f5a82
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment