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