diff --git a/debian/post.install.ovh.sh b/debian/post.install.ovh.sh index 6addb1b..9d6363f 100755 --- a/debian/post.install.ovh.sh +++ b/debian/post.install.ovh.sh @@ -1,5 +1,34 @@ #!/bin/sh +# Purpose {{{ +# This script should be called at the end of a OVH Debian installation +# 1. Update APT repositories and install few dependencies. +# 2. Umount and remove temp Logical Volume (with all free space). +# 3. Allow SSH connection with a password for root. +# 4. Download and extract a latecommand archive. +# 5. Source /etc/os-release file to have $VERSION_CODENAME variable. +# 6. Run last post-install script dedicated to Debian Codename. +# +# 2023-06-26 +# }}} +# Flags {{{ +## Exit on error {{{ +set -o errexit +## }}} +## Exit on unset var {{{ +### Use "${VARNAME-}" to test a var that may not have been set +set -o nounset +## }}} +## Pipeline command is treated as failed {{{ +### Not available in POSIX sh − https://github.com/koalaman/shellcheck/wiki/SC3040 +#set -o pipefail +## }}} +## Help with debugging {{{ +### Call the script by prefixing it with "TRACE=1 ./script.sh" +if [ "${TRACE-0}" -eq 1 ]; then set -o xtrace; fi +## }}} +# }}} + # Update repositories apt update # Install few dependencies @@ -21,3 +50,5 @@ tar xzf /tmp/latecommand.tar.gz -C /tmp/ ## Source /etc/os-release to get Debian codename . /etc/os-release /bin/sh /tmp/latecommand/post."${VERSION_CODENAME:=bookworm}".sh + +exit 0