Merge "Adds support for post-install scripts."
This commit is contained in:
commit
0a1bf74c32
@ -156,6 +156,12 @@ part of the process you need to customise:
|
|||||||
install packages, chain into configuration management tools or do other
|
install packages, chain into configuration management tools or do other
|
||||||
image specific operations.
|
image specific operations.
|
||||||
|
|
||||||
|
* post-install.d: Run code in the chroot. This is a good place to perform
|
||||||
|
tasks you want to handle after the OS/application install but before the
|
||||||
|
first boot of the image. Some examples of use would be: Run chkconfig
|
||||||
|
to disable unneeded services and clean the cache left by the package
|
||||||
|
manager to reduce the size of the image.
|
||||||
|
|
||||||
* first-boot.d: Runs inside the image before rc.local. Scripts from here are
|
* first-boot.d: Runs inside the image before rc.local. Scripts from here are
|
||||||
good for doing per-instance configuration based on cloud metadata.
|
good for doing per-instance configuration based on cloud metadata.
|
||||||
|
|
||||||
|
@ -117,6 +117,7 @@ run_d_in_target pre-install
|
|||||||
do_extra_package_install
|
do_extra_package_install
|
||||||
# Call install scripts to pull in the software users want.
|
# Call install scripts to pull in the software users want.
|
||||||
run_d_in_target install
|
run_d_in_target install
|
||||||
|
run_d_in_target post-install
|
||||||
prepare_first_boot
|
prepare_first_boot
|
||||||
finalise_base
|
finalise_base
|
||||||
unmount_image
|
unmount_image
|
||||||
|
6
elements/dpkg/post-install.d/99-clean-up-cache
Executable file
6
elements/dpkg/post-install.d/99-clean-up-cache
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Do an apt-get clean. This will free some space.
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
apt-get clean
|
Loading…
Reference in New Issue
Block a user