Commit 7d7cd42e authored by Vitaly Lipatov's avatar Vitaly Lipatov

serv-list_startup: temp. fix for non systemd systems

parent d36752df
......@@ -19,6 +19,8 @@
serv_list_startup()
{
load_helper serv-list_all
load_helper serv-status
case $SERVICETYPE in
# service-chkconfig|service-upstart)
# # service --status-all for Ubuntu/Fedora
......@@ -27,16 +29,18 @@ serv_list_startup()
# service-initd|service-update)
# sudocmd ls -1 /etc/init.d/* | sed -e "s|/etc/init.d/||g" | grep -v README
# ;;
# systemd)
# sudocmd systemctl list-unit-files
# ;;
*)
load_helper serv-list_all
load_helper serv-status
systemd)
#sudocmd systemctl list-unit-files
# TODO: native command? implement --short for list (only names)
for i in $(serv_list_all | cut -f 1 -d" " | grep "\.service$") ; do
is_service_autostart >/dev/null $i && echo $i
done
;;
*)
for i in $(serv_list_all | cut -f 1 -d" ") ; do
is_service_autostart >/dev/null $i && echo $i
done
;;
esac
}
Markdown is supported
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