Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f45e03d

Browse files
committed
feat: move disk format script to /var/lib/cloud/scripts/per-boot
1 parent f579c06 commit f45e03d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libvirt-ubuntu/cloud-init/user-data.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ chpasswd:
2121
type: text
2222

2323
write_files:
24-
- path: /tmp/format_disk.sh
24+
- path: /var/lib/cloud/scripts/per-boot/1_format_disk.sh
2525
content: |
2626
#!/bin/bash
2727
# if /dev/vdb1 doesn't exist, then we go ahead and create it
@@ -51,7 +51,6 @@ write_files:
5151
permissions: "0744"
5252

5353
runcmd:
54-
- [ /tmp/format_disk.sh ]
5554
- [ sudo, -u, coder, CODER_AGENT_TOKEN_FILE=/tmp/coder_agent_token, /tmp/coder_agent.sh ]
5655

5756
mounts:
@@ -61,4 +60,5 @@ mounts:
6160
# this also allows us to define an order in which modules run
6261
cloud_final_modules:
6362
- [write_files, always]
63+
- scripts-per-boot
6464
- [scripts-user, always]

0 commit comments

Comments
 (0)