Skip to content

Commit

Permalink
Moving to elemental_node_cleanup.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
rdoxenham committed May 21, 2024
1 parent 5ebf2b0 commit bc1b773
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/combustion/elemental_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,5 @@ func TestWriteElementalCombustionScript(t *testing.T) {
assert.Contains(t, found, "/etc/systemd/system/elemental-reset.path")
assert.Contains(t, found, "/etc/systemd/system/elemental-reset.service")
assert.Contains(t, found, "mkdir -p /opt/edge/")
assert.Contains(t, found, "cat <<- \\EOF > /opt/edge/node_cleanup.sh")
assert.Contains(t, found, "cat <<- \\EOF > /opt/edge/elemental_node_cleanup.sh")
}
6 changes: 3 additions & 3 deletions pkg/combustion/templates/31-elemental-register.sh.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ After=network-online.target
[Service]
Type=simple
ExecStart=/opt/edge/node_cleanup.sh -u
ExecStart=/opt/edge/elemental_node_cleanup.sh -u
ExecStartPost=/usr/bin/rm -f /var/lib/elemental/.unmanaged_reset
EOF

Expand All @@ -72,7 +72,7 @@ systemctl enable elemental-register-systemd.service || true
systemctl enable elemental-system-agent.service || true

mkdir -p /opt/edge/
cat <<- \EOF > /opt/edge/node_cleanup.sh
cat <<- \EOF > /opt/edge/elemental_node_cleanup.sh
#!/usr/bin/env bash
# SUSE Edge Elemental Node Reset Script
# Copyright 2024 SUSE Software Solutions
Expand Down Expand Up @@ -156,4 +156,4 @@ rm -f /etc/elemental/state.yaml
systemctl restart elemental-register-systemd.service
EOF

chmod a+x /opt/edge/node_cleanup.sh
chmod a+x /opt/edge/elemental_node_cleanup.sh

0 comments on commit bc1b773

Please sign in to comment.