From: hayao Date: Wed, 16 Dec 2020 09:30:05 +0000 (+0900) Subject: [fix] : Fixed service check X-Git-Tag: rc3-alpha2~25^2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=63b1497516e3ad8630b00c436792519592e158ef;p=alterlinux%2Falterlinux.git [fix] : Fixed service check --- diff --git a/channels/share/airootfs.any/root/customize_airootfs.sh b/channels/share/airootfs.any/root/customize_airootfs.sh index 7303240c..7663653e 100755 --- a/channels/share/airootfs.any/root/customize_airootfs.sh +++ b/channels/share/airootfs.any/root/customize_airootfs.sh @@ -290,7 +290,8 @@ _systemd_service(){ local _command="${1}" shift 1 for _service in "${@}"; do - if [[ -f "$(systemctl cat "${_service}" 2> "/dev/null" | head -n 1 | tail | sed 's|# ||g')" ]]; then + #if [[ -f "$(systemctl cat "${_service}" 2> "/dev/null" | head -n 1 | tail | sed 's|# ||g')" ]]; then + if systemctl cat "${_service}" 1>&2 2>/dev/null; then systemctl ${_command} "${_service}" fi done