Re: Automatic update of images

Vinícius Ferrão via Ltsp-discuss <[email protected]> Thu, 8 Aug 2019 17:38:43 +0000
Newsgroups gmane.linux.terminal-server.general
Message-ID <[email protected]>
Thank you Joseph. I ended up modifying it a little bit and getting other inspiration from lisp-chroot command, here it is the final script:

-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-

#!/bin/sh

CHROOT_DIR=/opt/ltsp/amd64

echo "Mouting filesystems"
mount -t proc proc "$CHROOT_DIR/proc"
mount --bind "/dev" "$CHROOT_DIR/dev"
mount -t devpts -o rw,noexec,nosuid,gid=5,mode=620 devpts "$CHROOT_DIR/dev/pts"

echo "Running update..."
chroot $CHROOT_DIR apt --yes --allow-downgrades --allow-remove-essential --allow-change-held-packages update
chroot $CHROOT_DIR env LTSP_HANDLE_DAEMONS=false apt --yes --allow-downgrades --allow-remove-essential --allow-change-held-packages full-upgrade
chroot $CHROOT_DIR apt --yes --allow-downgrades --allow-remove-essential --allow-change-held-packages autoremove

echo "Unmounting filesystems"
trap - 0 HUP INT QUIT KILL SEGV PIPE TERM 
umount $CHROOT_DIR/dev/pts
umount $CHROOT_DIR/dev
umount $CHROOT_DIR/proc

echo "Building new images"
ltsp-update-image

echo “Done"

-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-

Thanks


> On 8 Aug 2019, at 12:10, Joseph Bishay <[email protected]> wrote:
> 
> Hello,
> 
> There is a script at the bottom of this page - it may need to be adapted to the specifics of your LTSP version.
> 
> https://help.ubuntu.com/community/UbuntuLTSP/UpdatingChroot
> 
> I hope it helps.
> Joseph
> 
> On Thu, Aug 8, 2019 at 10:41 AM Vinícius Ferrão via Ltsp-discuss <[email protected]> wrote:
> Hello,
> 
> Is there any recommended approaches to automatic update LTSP images?
> 
> I was thinking in writing a simple sh script to chroot, apt update/upgrade and then rebuild the images.
> 
> Thanks,
> 
> Sent from my iPhone
> 
> _____________________________________________________________________
> Ltsp-discuss mailing list.   To un-subscribe, or change prefs, goto:
>       https://lists.sourceforge.net/lists/listinfo/ltsp-discuss
> For additional LTSP help,   try #ltsp channel on irc.freenode.net


_____________________________________________________________________
Ltsp-discuss mailing list.   To un-subscribe, or change prefs, goto:
      https://lists.sourceforge.net/lists/listinfo/ltsp-discuss
For additional LTSP help,   try #ltsp channel on irc.freenode.net