Skip to content

Commit

Permalink
chore: remove unnecessary systemd settings (#5830)
Browse files Browse the repository at this point in the history
- RHEL family distros use ds-identify, and therefore the run directory is
  already made and ds-identify will have created the enabled file.
- network.service doesn't appear to ever have been used, and was probably
  intended to be network.target.
  • Loading branch information
holmanb committed Oct 18, 2024
1 parent 0680d03 commit 9bb0a88
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 9 deletions.
5 changes: 0 additions & 5 deletions systemd/cloud-init-local.service.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ DefaultDependencies=no
Wants=network-pre.target
After=hv_kvp_daemon.service
Before=NetworkManager.service
{% if variant in ["almalinux", "cloudlinux", "rhel"] %}
Before=network.service
{% endif %}
Before=network-pre.target
Before=shutdown.target
{% if variant in ["almalinux", "cloudlinux", "rhel"] %}
Expand All @@ -28,9 +25,7 @@ ConditionEnvironment=!KERNEL_CMDLINE=cloud-init=disabled
[Service]
Type=oneshot
{% if variant in ["almalinux", "cloudlinux", "rhel"] %}
ExecStartPre=/bin/mkdir -p /run/cloud-init
ExecStartPre=/sbin/restorecon /run/cloud-init
ExecStartPre=/usr/bin/touch /run/cloud-init/enabled
{% endif %}
# This service is a shim which preserves systemd ordering while allowing a
# single Python process to run cloud-init's logic. This works by communicating
Expand Down
2 changes: 0 additions & 2 deletions systemd/cloud-init-main.service.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ KillMode=process
TasksMax=infinity
TimeoutStartSec=infinity
{% if variant in ["almalinux", "cloudlinux", "rhel"] %}
ExecStartPre=/bin/mkdir -p /run/cloud-init
ExecStartPre=/sbin/restorecon /run/cloud-init
ExecStartPre=/usr/bin/touch /run/cloud-init/enabled
{% endif %}

# Output needs to appear in instance console output
Expand Down
2 changes: 0 additions & 2 deletions systemd/cloud-init-network.service.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ After=networking.service
{% if variant in ["almalinux", "centos", "cloudlinux", "eurolinux", "fedora",
"miraclelinux", "openeuler", "OpenCloudOS", "openmandriva", "rhel", "rocky",
"suse", "TencentOS", "virtuozzo"] %}

After=network.service
After=NetworkManager.service
After=NetworkManager-wait-online.service
{% endif %}
Expand Down

0 comments on commit 9bb0a88

Please sign in to comment.