From f96cf7c3646fd3f07164f820200ba7b2b8d1120b Mon Sep 17 00:00:00 2001 From: Ratchanan Srirattanamet Date: Wed, 9 Jun 2021 22:24:20 +0700 Subject: [PATCH] Support ut20.04 images --- functions/distributions.sh | 14 +++++++++----- functions/misc.sh | 2 +- halium-install | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/functions/distributions.sh b/functions/distributions.sh index b7e7606..c2bbb24 100644 --- a/functions/distributions.sh +++ b/functions/distributions.sh @@ -12,7 +12,7 @@ halium | reference) pm | neon | debian-pm | debian-pm-caf) IMAGE_SIZE=4G ;; -ut) +ut | ut20.04) IMAGE_SIZE=3G ;; none) @@ -137,11 +137,15 @@ function post_install() { # set static path for now chroot_run "dpkg-reconfigure openssh-server" ;; - ut) + ut | ut20.04) echo -n "enabling SSH ... " - sudo sed -i 's/PasswordAuthentication=no/PasswordAuthentication=yes/g' "$ROOTFS_DIR/etc/init/ssh.override" - sudo sed -i 's/manual/start on startup/g' "$ROOTFS_DIR/etc/init/ssh.override" - sudo sed -i 's/manual/start on startup/g' "$ROOTFS_DIR/etc/init/usb-tethering.conf" + if [ "$1" = ut ]; then + sudo sed -i 's/PasswordAuthentication=no/PasswordAuthentication=yes/g' "$ROOTFS_DIR/etc/init/ssh.override" + sudo sed -i 's/manual/start on startup/g' "$ROOTFS_DIR/etc/init/ssh.override" + sudo sed -i 's/manual/start on startup/g' "$ROOTFS_DIR/etc/init/usb-tethering.conf" + else + chroot_run "systemctl enable ssh.service usb-tethering.service" 1>&4 + fi echo "[done]" setup_passwd phablet $USERPASSWORD diff --git a/functions/misc.sh b/functions/misc.sh index e226808..86353e4 100755 --- a/functions/misc.sh +++ b/functions/misc.sh @@ -38,7 +38,7 @@ function usage() { Options: -p POSTINSTALL run common post installation tasks for release. - supported: reference, neon, ut, debian-pm, debian-pm-caf, none + supported: reference, neon, ut, ut20.04, debian-pm, debian-pm-caf, none default: none -v verbose output. diff --git a/halium-install b/halium-install index cd8ce68..8b424ca 100755 --- a/halium-install +++ b/halium-install @@ -41,7 +41,7 @@ while [ -n "$1" ] ; do shift export ROOTFS_RELEASE="$1" case $ROOTFS_RELEASE in - "halium" | "debian-pm" | "reference" | "debian-pm-caf" | "pm" | "neon" | "ut" | "none") + "halium" | "debian-pm" | "reference" | "debian-pm-caf" | "pm" | "neon" | "ut" | "ut20.04" | "none") ;; *) echo "Unsupported post install release! Exiting now"