COPY testnode_start.sh /
COPY testnode_stop.sh /
COPY testnode_sudoers /etc/sudoers.d/teuthology
-COPY run-fs.service /etc/systemd/system/
-RUN systemctl enable run-fs
+COPY run-fs.service scratch-devs.service /etc/systemd/system/
+RUN systemctl enable run-fs scratch-devs
RUN \
ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N '' && \
sed -i 's/#PermitRootLogin yes/PermitRootLogin yes/' /etc/ssh/sshd_config && \
--- /dev/null
+[Unit]
+Description=Write /scratch_devs
+
+[Service]
+Type=oneshot
+RemainAfterExit=true
+ExecStart=/bin/bash -c "ls -1 /dev/loop[0-9]* > /scratch_devs"
+
+[Install]
+WantedBy=multi-user.target