Skip to content

Commit

Permalink
fix(ic-os): only enable systemd units that are enableable.
Browse files Browse the repository at this point in the history
  • Loading branch information
DFINITYManu committed Jan 18, 2024
1 parent c1a1563 commit fd19e57
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ic-os/boundary-guestos/rootfs/Dockerfile
Expand Up @@ -154,7 +154,7 @@ RUN if [ "${ROOT_PASSWORD}" != "" ]; then \
# to node operation.

RUN for SERVICE in /etc/systemd/system/*; do \
if [ -f "$SERVICE" -a ! -L "$SERVICE" ] ; then systemctl enable "${SERVICE#/etc/systemd/system/}" ; fi ; \
if [ -f "$SERVICE" -a ! -L "$SERVICE" ] && grep -q '^.Install.' "$SERVICE" ; then systemctl enable "${SERVICE#/etc/systemd/system/}" ; fi ; \
done && \
systemctl enable \
chrony \
Expand Down
2 changes: 1 addition & 1 deletion ic-os/guestos/rootfs/Dockerfile
Expand Up @@ -97,7 +97,7 @@ RUN mkdir -p /mnt/var_old /mnt/var_new

RUN \
for SERVICE in /etc/systemd/system/*; do \
if [ -f "$SERVICE" -a ! -L "$SERVICE" ] ; then systemctl enable "${SERVICE#/etc/systemd/system/}" ; fi ; \
if [ -f "$SERVICE" -a ! -L "$SERVICE" ] && grep -q '^.Install.' "$SERVICE" ; then systemctl enable "${SERVICE#/etc/systemd/system/}" ; fi ; \
done

RUN systemctl enable \
Expand Down
2 changes: 1 addition & 1 deletion ic-os/hostos/rootfs/Dockerfile
Expand Up @@ -79,7 +79,7 @@ RUN sed -e "s/.*PermitRootLogin.*/PermitRootLogin prohibit-password/" -i /etc/ss

RUN \
for SERVICE in /etc/systemd/system/*; do \
if [ -f "$SERVICE" -a ! -L "$SERVICE" ]; then systemctl enable "${SERVICE#/etc/systemd/system/}" ; fi ; \
if [ -f "$SERVICE" -a ! -L "$SERVICE" ] && grep -q '^.Install.' "$SERVICE" ; then systemctl enable "${SERVICE#/etc/systemd/system/}" ; fi ; \
done

RUN systemctl enable \
Expand Down
2 changes: 1 addition & 1 deletion ic-os/setupos/rootfs/Dockerfile
Expand Up @@ -61,7 +61,7 @@ RUN cd /prep && ./prep.sh && cd / && rm -rf /prep

RUN \
for SERVICE in /etc/systemd/system/*; do \
if [ -f "$SERVICE" -a ! -L "$SERVICE" ] ; then systemctl enable "${SERVICE#/etc/systemd/system/}" ; fi ; \
if [ -f "$SERVICE" -a ! -L "$SERVICE" ] && grep -q '^.Install.' "$SERVICE" ; then systemctl enable "${SERVICE#/etc/systemd/system/}" ; fi ; \
done

RUN systemctl enable \
Expand Down

0 comments on commit fd19e57

Please sign in to comment.