diff --git a/debian/post.install.ovh.sh b/debian/post.install.ovh.sh new file mode 100755 index 0000000..6addb1b --- /dev/null +++ b/debian/post.install.ovh.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +# Update repositories +apt update +# Install few dependencies +apt --assume-yes install -- wget + +# Remove last partition with all free space +umount /dev/sys/free +lvremove --force /dev/sys/free +/bin/rmdir --force -- /mnt/free +/bin/sed --in-place -- '/lv_free/d' /etc/fstab + +# Allow root connection with password +/bin/sed --in-place -- 's/\(^\|^\#\)\(PermitRootLogin\).*/\2 yes/g' /etc/ssh/sshd_config + +# Download and uncompress latecommand archive +wget --quiet --output-document=/tmp/latecommand.tar.gz -- "https://git.ipr.univ-rennes1.fr/cellinfo/tftpboot/raw/branch/master/scripts/latecommand.tar.gz" +tar xzf /tmp/latecommand.tar.gz -C /tmp/ +# Run dedicated script +## Source /etc/os-release to get Debian codename +. /etc/os-release +/bin/sh /tmp/latecommand/post."${VERSION_CODENAME:=bookworm}".sh