scripts/debian/post.install.ovh.sh

24 lines
806 B
Bash
Executable File

#!/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