]> code.ossystems Code Review - openembedded-core.git/commitdiff
crond: remove UID check in init script
authorJack Mitchell <jmitchell@cbnl.com>
Tue, 15 Oct 2013 09:06:14 +0000 (10:06 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 18 Oct 2013 14:47:12 +0000 (15:47 +0100)
this init script fails when the default shell is busybox sh. This
is because busybox sh doesn't set the UID. No other init scripts
in oecore feel the need to check the UID so just remove the check.

Signed-off-by: Jack Mitchell <jmitchell@cbnl.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
meta/recipes-extended/cronie/cronie/crond.init

index 08f34beed955dcec21eb54bf289bfd105a0ed208..c8dffef89a3e0bb80f40686dacef944a780742dc 100755 (executable)
@@ -23,10 +23,6 @@ CONFIG=/etc/sysconfig/crond
 
 case "$1" in
   start)
-    if [ $UID -ne 0 ] ; then
-        echo "User has insufficient privilege."
-        exit 1
-    fi
     echo -n "Starting crond: "
     start-stop-daemon --start --quiet --exec $CROND -- $CRONDARGS
     RETVAL=$?
@@ -37,10 +33,6 @@ case "$1" in
     fi
     ;;
   stop)
-    if [ $UID -ne 0 ] ; then
-        echo "User has insufficient privilege."
-        exit 1
-    fi
     echo -n "Stopping crond: "
     start-stop-daemon --stop --quiet --pidfile /var/run/crond.pid
     RETVAL=$?