Browse Source

Enhance scripts

content-update
Xavier Petit 5 years ago
parent
commit
88d87f6d32
No known key found for this signature in database
GPG Key ID: CA3F2B17E25ABD26
  1. 5
      scripts/install_client.sh
  2. 2
      scripts/system/etc/gdm3/PostSession/Default
  3. 2
      scripts/system/usr/share/initramfs-tools/scripts/init-premount/reformat

5
scripts/install_client.sh

@ -63,11 +63,8 @@ cp -r system /tmp
cd /tmp/system
sed -i -e "s|::DISK::|$DISK|g" etc/udev/rules.d/10-local.rules
PART=$(lsblk -pro kname,partlabel | grep 01-tmp-system | cut -d' ' -f1)
sed -i -e "s|::PART::|$PART|g" usr/share/initramfs-tools/scripts/init-premount/reformat
apt-get -y install overlayroot
echo overlayroot=\"device:dev=$PART,recurse=0\" >> /etc/overlayroot.conf
echo overlayroot=\"device:dev=/dev/disk/by-partlabel/01-tmp-system,recurse=0\" >> /etc/overlayroot.conf
# Fix permissions
find . -type d -exec chmod 755 {} \;

2
scripts/system/etc/gdm3/PostSession/Default

@ -22,3 +22,5 @@ systemctl stop user@1000.service
# Make sure the mountpoints are free
kill $(lsof -t "$HOME" /mnt) $(ps --no-headers -u student -o pid)
umount "$HOME" /mnt
umount /dev/disk/by-partlabel/01-home ||:
wipefs -a /dev/disk/by-partlabel/01-tmp-home

2
scripts/system/usr/share/initramfs-tools/scripts/init-premount/reformat

@ -15,6 +15,6 @@ esac
. /scripts/functions
/bin/mke2fs -F -t ext4 -O ^has_journal ::PART:: > /dev/null 2>&1
/bin/mke2fs -F -t ext4 -O ^has_journal /dev/disk/by-partlabel/01-tmp-system > /dev/null 2>&1
exit 0

Loading…
Cancel
Save