Skip to content

Commit 162f427

Browse files
authored
Merge pull request #86 from tzneal/remove-systemd-hack-on-al2023
remove the systemd hack on al2023
2 parents 767f6be + c3ae94d commit 162f427

1 file changed

Lines changed: 0 additions & 22 deletions

File tree

config/userdata-al2023.sh

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -38,25 +38,3 @@ sudo mkdir -p /etc/systemd/system/containerd.service.d
3838
printf '[Service]\nSlice=runtime.slice\n' | sudo tee /etc/systemd/system/containerd.service.d/00-runtime-slice.conf
3939

4040
systemctl restart containerd
41-
42-
# hack systemd-run so it ignores the "-p StandardError=file:///some/file.log" option that isn't supported
43-
# by systemd
44-
sudo mv /usr/bin/systemd-run /usr/bin/systemd-run.real
45-
cat << __ESYSD__ > /usr/bin/systemd-run
46-
#!/usr/bin/env python3
47-
48-
import sys
49-
import subprocess
50-
51-
52-
actual_args = ["systemd-run.real"]
53-
for arg in sys.argv[1:]:
54-
if arg.startswith('StandardError'):
55-
# remove the -p
56-
actual_args.pop()
57-
else:
58-
actual_args.append(arg)
59-
60-
subprocess.run(actual_args)
61-
__ESYSD__
62-
chmod a+x /usr/bin/systemd-run

0 commit comments

Comments
 (0)