mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-30 01:26:38 +00:00
support sles12sp3 servicenode installation (#5426)
* support sles12sp3 servicenode installation * polished
This commit is contained in:
parent
c494001ba2
commit
806c507a6a
@ -270,9 +270,18 @@ if [ $? -eq 0 ]; then
|
||||
fi
|
||||
|
||||
if [ $hassystemd -eq 1 ] ; then
|
||||
cat >/etc/systemd/system/xcatpostinit1.service <<'EOF'
|
||||
if [[ $OSVER == sles12* ]]; then
|
||||
cat >/etc/systemd/system/xcatpostinit1.service <<'EOF'
|
||||
#INCLUDE:/install/postscripts/xcatpostinit1.service.yast2#
|
||||
EOF
|
||||
cat >/opt/xcat/xcatpostinit1.service.sles <<'EOF'
|
||||
#INCLUDE:/install/postscripts/xcatpostinit1.service#
|
||||
EOF
|
||||
else
|
||||
cat >/etc/systemd/system/xcatpostinit1.service <<'EOF'
|
||||
#INCLUDE:/install/postscripts/xcatpostinit1.service#
|
||||
EOF
|
||||
fi
|
||||
if [ "$XCATDEBUGMODE" = "1" ] || [ "$XCATDEBUGMODE" = "2" ]; then
|
||||
msgutil_r "$MASTER_IP" "debug" "/etc/systemd/system/xcatpostinit1.service generated" "/var/log/xcat/xcat.log" "$log_label"
|
||||
fi
|
||||
|
@ -48,6 +48,10 @@ start)
|
||||
if [ -r /opt/xcat/xcatinstallpost ]; then
|
||||
/opt/xcat/xcatinstallpost
|
||||
fi
|
||||
if [ -f /opt/xcat/xcatpostinit1.service.sles ]; then
|
||||
rm -rf /etc/systemd/system/xcatpostinit1.service
|
||||
mv /opt/xcat/xcatpostinit1.service.sles /etc/systemd/system/xcatpostinit1.service
|
||||
fi
|
||||
fi
|
||||
|
||||
;;
|
||||
|
12
xCAT/postscripts/xcatpostinit1.service.yast2
Normal file
12
xCAT/postscripts/xcatpostinit1.service.yast2
Normal file
@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=xcat service on compute node, the framework to run postbootscript during OS provision
|
||||
After=network.target rsyslog.service YaST2-Firstboot.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/opt/xcat/xcatpostinit1 start
|
||||
ExecStop=/opt/xcat/xcatpostinit1 stop
|
||||
RemainAfterExit=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
x
Reference in New Issue
Block a user