2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-08-19 09:40:21 +00:00

Merge pull request #7328 from Obihoernchen/megware/kickstart_chroot_el9

Fix EL9 chroot detection for syncfiles
This commit is contained in:
besawn
2023-02-09 14:02:23 -05:00
committed by GitHub

View File

@@ -430,7 +430,7 @@ function startservice {
local retmsg
retmsg=`$cmd 2>&1`
retval=$?
[ "$retval" = "0" ] && (echo "$retmsg" | grep -i "Running in chroot,\s*ignoring request.*" >/dev/null 2>&1) && retval=1
[ "$retval" = "0" ] && (echo "$retmsg" | grep -i "Running in chroot,\s*ignoring .*" >/dev/null 2>&1) && retval=1
return $retval
}
@@ -474,7 +474,7 @@ function stopservice {
local retmsg
retmsg=`$cmd 2>&1`
retval=$?
[ "$retval" = "0" ] && (echo "$retmsg" | grep -i "Running in chroot,\s*ignoring request.*" >/dev/null 2>&1) && retval=1
[ "$retval" = "0" ] && (echo "$retmsg" | grep -i "Running in chroot,\s*ignoring .*" >/dev/null 2>&1) && retval=1
return $retval
}
@@ -522,7 +522,7 @@ function restartservice {
#In the chrooted env, the system management commands(start/stop/restart) will be ignored and the return code is 0
#need to return the proper code in the chrooted scenario
[ "$retval" = "0" ] && (echo "$retmsg" | grep -i "Running in chroot,\s*ignoring request.*" >/dev/null 2>&1) && retval=1
[ "$retval" = "0" ] && (echo "$retmsg" | grep -i "Running in chroot,\s*ignoring .*" >/dev/null 2>&1) && retval=1
return $retval
}