Skip to contentSkip to conversation

crond: remove UID check in init script

PATCH New Jack Mitchell 1 participant 1 message Oct 15, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crond: remove UID check in init script

From: Jack Mitchell <[email protected]>

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.

---
 meta/recipes-extended/cronie/cronie/crond.init | 8 --------
 1 file changed, 8 deletions(-)
meta/recipes-extended/cronie/cronie/crond.init +0 -8
index 08f34be..c8dffef 100755
@@ -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=$?
Signature · 1 line
1.8.4