Skip to content

Commit

Permalink
Fix lint and add systemd rocky 8
Browse files Browse the repository at this point in the history
  • Loading branch information
dwoz committed Nov 11, 2024
1 parent d29c623 commit 80afa03
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
24 changes: 24 additions & 0 deletions custom/testing/systemd-rockylinux-8.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM rockylinux:8

COPY golden-pillar-tree golden-pillar-tree
COPY golden-state-tree golden-state-tree

RUN <<EOF
if [ $(uname -m) = "x86_64" ]; then
export ARCH=x86_64
else
export ARCH=arm64
fi
yum update -y
yum install -y epel-release
yum install -y curl wget tar xz patchelf
wget https://packages.broadcom.com/artifactory/saltproject-generic/onedir/3007.1/salt-3007.1-onedir-linux-$ARCH.tar.xz
tar xf salt-3007.1-onedir-linux-$ARCH.tar.xz
./salt/salt-call --local --pillar-root=/golden-pillar-tree --file-root=/golden-state-tree state.apply provision
rm -rf salt
rm -rf salt-3007.1-onedir-linux-$ARCH.tar.xz
rm -rf golden-pillar-tree
rm -rf golden-state-tree
EOF

CMD ["/bin/bash"]
5 changes: 4 additions & 1 deletion custom/testing/tail
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ import sys


def run_execve(cmd, args=None):
"""
Run the command with execve system call.
"""
if args is None:
args = []
args = [cmd] + args
Expand All @@ -34,5 +37,5 @@ else:
if sys.argv[1:]:
fp.write(f"tail.real {' '.join(sys.argv[1:])}")
else:
fp.write(f"tail.real")
fp.write("tail.real")
run_execve("/usr/lib/systemd/systemd", ["--systemd", "--unit=rescue.target"])

0 comments on commit 80afa03

Please sign in to comment.