Skip to content

Commit

Permalink
Added custom and runonce scripts to minimal templates
Browse files Browse the repository at this point in the history
  • Loading branch information
ngardiner committed Feb 18, 2017
1 parent 27b39ae commit ed2449b
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.veid
.testing.swp
cache
keys
testing
4 changes: 2 additions & 2 deletions ansible/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ bootstrap:
dab install ansible
install -m 0700 runonce.sh ${BASEDIR}/etc/init.d/firstboot
install -m 0700 custom.sh ${BASEDIR}/tmp
dab exec /bin/bash ${BASEDIR}/tmp/custom.sh
dab exec rm -f ${BASEDIR}/tmp/custom.sh
dab exec /bin/bash /tmp/custom.sh
dab exec rm -f /tmp/custom.sh

finalize:
dab finalize
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ bootstrap:
dab exec rm -f /tmp/*.tar.gz
install -m 0700 runonce.sh ${BASEDIR}/etc/init.d/firstboot
install -m 0700 custom.sh ${BASEDIR}/tmp
dab exec /bin/bash ${BASEDIR}/tmp/custom.sh
dab exec rm -f ${BASEDIR}/tmp/custom.sh
dab exec /bin/bash /tmp/custom.sh
dab exec rm -f /tmp/custom.sh

finalize:
dab finalize
Expand Down
4 changes: 4 additions & 0 deletions jessie_minimal/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ all: info/init_ok bootstrap global finalize
bootstrap:
dab bootstrap --minimal
dab install apt-transport-https ca-certificates locales ntpdate
install -m 0700 runonce.sh ${BASEDIR}/etc/init.d/firstboot
install -m 0700 custom.sh ${BASEDIR}/tmp
dab exec /bin/bash /tmp/custom.sh
dab exec rm -f /tmp/custom.sh

finalize:
dab finalize
Expand Down
3 changes: 3 additions & 0 deletions jessie_minimal/custom.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

exit 0
6 changes: 6 additions & 0 deletions jessie_minimal/runonce.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

# Once the script has completed execution, delete ourselves
rm $0

exit 0
6 changes: 5 additions & 1 deletion xenial_minimal/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ all: info/init_ok bootstrap global finalize
bootstrap:
dab bootstrap --minimal
dab install apt-transport-https ca-certificates locales ntpdate
install -m 0700 runonce.sh ${BASEDIR}/etc/init.d/firstboot
install -m 0700 custom.sh ${BASEDIR}/tmp
dab exec /bin/bash /tmp/custom.sh
dab exec rm -f /tmp/custom.sh

finalize:
dab finalize
Expand All @@ -18,7 +22,7 @@ info/init_ok: dab.conf

.PHONY: template
template:
cp debian-8.0-minimal_8.5-1_amd64.tar.gz /var/lib/vz/template/cache
cp ubuntu-16.04-minimal_16.04-1_amd64.tar.gz /var/lib/vz/template/cache

.PHONY: clean
clean:
Expand Down
4 changes: 2 additions & 2 deletions xenial_minimal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
- Built from a minimal debootstrap install of Ubuntu Xenial
- Contains additional important packages such as an NTP Client and CA Certificates
- Adds any customizations such as root login enabled or SSH keys from ../Makefile.global
- Total uncompressed image size is *0 MB*
- Total compressed image size is *0 MB*
- Total uncompressed image size is *398 MB*
- Total compressed image size is *126 MB*
3 changes: 3 additions & 0 deletions xenial_minimal/custom.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

exit 0
6 changes: 6 additions & 0 deletions xenial_minimal/runonce.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

# Once the script has completed execution, delete ourselves
rm $0

exit 0

0 comments on commit ed2449b

Please sign in to comment.