Added ocs' services to add/remove extra volumes. disconnect root fs. #1
This commit is contained in:
parent
d6e1e0c65f
commit
0f6d8ebc25
|
@ -48,10 +48,12 @@ RUN mkdir /tmp/build-xnbd \
|
||||||
|
|
||||||
# Systemd
|
# Systemd
|
||||||
RUN systemctl disable getty@tty1.service \
|
RUN systemctl disable getty@tty1.service \
|
||||||
|
&& systemctl enable NetworkManager-wait-online.service \
|
||||||
&& systemctl disable systemd-networkd.service \
|
&& systemctl disable systemd-networkd.service \
|
||||||
&& systemctl enable serial-getty@ttyS0.service \
|
&& systemctl enable serial-getty@ttyS0.service \
|
||||||
&& systemctl enable sshd.service \
|
&& systemctl enable sshd.service \
|
||||||
&& systemctl enable NetworkManager
|
&& systemctl enable NetworkManager \
|
||||||
|
&& systemctl enable ntpdate
|
||||||
|
|
||||||
|
|
||||||
# Patch rootfs
|
# Patch rootfs
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
[Unit]
|
||||||
|
Description=OCS additional volumes mounter
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/sbin/oc-add-extra-volumes
|
||||||
|
ExecStop=/usr/sbin/oc-remove-extra-volumes
|
||||||
|
Type=forking
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=basic.target
|
|
@ -0,0 +1,10 @@
|
||||||
|
[Unit]
|
||||||
|
Description=OCS fetch ssh keys from metadata
|
||||||
|
After=NetworkManager-wait-online.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/bin/bash -c "mkdir -p /root/.ssh/ ; chmod 700 /root/.ssh ; /usr/local/bin/oc-metadata | grep SSH_PUBLIC_KEYS_.*_KEY | cut -d'=' -f 2- | tr -d \\' > /root/.ssh/authorized_keys"
|
||||||
|
Type=oneshot
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
|
@ -0,0 +1,10 @@
|
||||||
|
[Unit]
|
||||||
|
Description=OCS fetch kernel modules from OCS mirror
|
||||||
|
After=NetworkManager-wait-online.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/sbin/oc-sync-kernel-modules
|
||||||
|
Type=oneshot
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Loading…
Reference in New Issue