* different shells different behavior?
bash prints 'type: update-rc.d: not found' on stderr
busybox's sh on stdout
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
OPTS="--root=$D"
fi
-if type systemctl >/dev/null; then
+if type systemctl >/dev/null 2>/dev/null; then
systemctl $OPTS ${SYSTEMD_AUTO_ENABLE} ${SYSTEMD_SERVICE}
if [ -z "$D" -a "${SYSTEMD_AUTO_ENABLE}" = "enable" ]; then
}
systemd_prerm() {
-if type systemctl >/dev/null; then
+if type systemctl >/dev/null 2>/dev/null; then
if [ -z "$D" ]; then
systemctl stop ${SYSTEMD_SERVICE}
fi
else
OPT="-s"
fi
-if type update-rc.d >/dev/null; then
+if type update-rc.d >/dev/null 2>/dev/null; then
update-rc.d $OPT ${INITSCRIPT_NAME} ${INITSCRIPT_PARAMS}
fi
}
else
OPT=""
fi
-if type update-rc.d >/dev/null; then
+if type update-rc.d >/dev/null 2>/dev/null; then
update-rc.d $OPT ${INITSCRIPT_NAME} remove
fi
}