mirror of https://github.com/k3s-io/k3s
Restore selinux context systemd unit file (#8593)
* Restore context of systemd unit file Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com> * Restore context of systemd unit file Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com> * update the hash of install.sh file Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com> --------- Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>pull/8752/head
parent
49411e7084
commit
112e1339b7
|
@ -961,11 +961,16 @@ EOF
|
|||
|
||||
# --- write systemd or openrc service file ---
|
||||
create_service_file() {
|
||||
[ "${HAS_SYSTEMD}" = true ] && create_systemd_service_file
|
||||
[ "${HAS_SYSTEMD}" = true ] && create_systemd_service_file && restore_systemd_service_file_context
|
||||
[ "${HAS_OPENRC}" = true ] && create_openrc_service_file
|
||||
return 0
|
||||
}
|
||||
|
||||
restore_systemd_service_file_context() {
|
||||
restorecon -R -i ${FILE_K3S_SERVICE} || true
|
||||
restorecon -R -i ${FILE_K3S_ENV} || true
|
||||
}
|
||||
|
||||
# --- get hashes of the current k3s bin and service files
|
||||
get_installed_hashes() {
|
||||
$SUDO sha256sum ${BIN_DIR}/k3s ${FILE_K3S_SERVICE} ${FILE_K3S_ENV} 2>&1 || true
|
||||
|
|
|
@ -1 +1 @@
|
|||
3798b669b3ede25b2d3bfb9039a744604efb3681a351b2c1e0b01b7b05f0a434 install.sh
|
||||
ff8b7b4028299c878180c1288efa73205c54c7c3fbc2d313fcc666374526d221 install.sh
|
||||
|
|
Loading…
Reference in New Issue