Browse Source

install_easy: improve openrc detection

pull/81/head
bol-van 3 years ago
parent
commit
528328a2b5
  1. 4
      install_easy.sh
  2. 4
      uninstall_easy.sh

4
install_easy.sh

@ -209,10 +209,10 @@ check_system()
# some distros include systemctl without systemd
if [ -d "$SYSTEMD_DIR" ] && [ -x "$SYSTEMCTL" ] && [ "$(basename $(readlink /proc/1/exe))" = "systemd" ]; then
SYSTEM=systemd
elif exists rc-update && [ "$(basename $(readlink /proc/1/exe))" = "openrc-init" ]; then
SYSTEM=openrc
elif [ -f "/etc/openwrt_release" ] && exists opkg && exists uci ; then
SYSTEM=openwrt
elif exists /sbin/openrc-run || exists /usr/sbin/openrc-run ; then
SYSTEM=openrc
else
echo system is not either systemd, openrc or openwrt based
echo easy installer can set up config settings but can\'t configure auto start

4
uninstall_easy.sh

@ -56,10 +56,10 @@ check_system()
# some distros include systemctl without systemd
if [ -d "$SYSTEMD_DIR" ] && [ -x "$SYSTEMCTL" ] && [ "$(basename $(readlink /proc/1/exe))" = "systemd" ]; then
SYSTEM=systemd
elif exists rc-update && [ "$(basename $(readlink /proc/1/exe))" = "openrc-init" ]; then
SYSTEM=openrc
elif [ -f "/etc/openwrt_release" ] && exists opkg && exists uci ; then
SYSTEM=openwrt
elif exists /sbin/openrc-run || exists /usr/sbin/openrc-run ; then
SYSTEM=openrc
else
echo system is not either systemd, openrc or openwrt based
echo check readme.txt for manual setup info.

Loading…
Cancel
Save