Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ltsp.conf
- (9:59:41 AM) TedHughes: [default]
- (9:59:41 AM) TedHughes: LDM_AUTOLOGIN = False
- (9:59:41 AM) TedHughes: LOCAL_APPS_MENU = True
- (9:59:41 AM) TedHughes: LDM_ALLOW_GUEST = False
- (9:59:41 AM) TedHughes: LDM_LIMIT_ONE_SESSION = False
- (9:59:41 AM) TedHughes: FAT_RAM_THRESHOLD = 500
- (9:59:41 AM) TedHughes: XKBLAYOUT = us
- (9:59:41 AM) TedHughes: LOCAL_APPS = True
- (9:59:41 AM) TedHughes: SOUND = True
- (9:59:41 AM) TedHughes: LDM_DIRECTX = True
- (9:59:41 AM) TedHughes: LTSP_FATCLIENT = TRUE
- (9:59:41 AM) TedHughes: LOCALDEV = True
- (9:59:41 AM) TedHughes: CONSOLE_KEYMAP = us
- (9:59:41 AM) TedHughes: NETWORK_COMPRESSION = False
- On fat clients the directive LTSP_FATCLIENT = TRUE is missing
- Also modified the scripts as extra options would be nice.
- #!/usr/bin/perl -s
- use strict;
- use warnings;
- use EBox;
- use EBox::Gettext;
- use EBox::Global;
- use Error qw(:try);
- if (scalar @ARGV >= 1) {
- my $arch = $ARGV[0];
- my $fat = $ARGV[1];
- my $chroot = ($fat ? "fat-$arch" : $arch);
- EBox::init();
- my $ltsp = EBox::Global->modInstance('ltsp');
- $ltsp->st_set_string('work', 'build');
- $ltsp->st_set_string('error', '');
- print "Building $chroot image...\n";
- my $buildCmd = "ltsp-build-client --arch $arch --purge-chroot --copy-sourceslist --apt-keys /etc/apt/trusted.gpg";
- if ($fat) {
- $buildCmd .= " --chroot $chroot --fat-client-desktop ubuntu-desktop";
- }
- try {
- # TODO: add more messages to ltsp.log (with timestamps)
- EBox::Sudo::root("echo `date` $buildCmd >> /var/log/zentyal/ltsp.log");
- EBox::Sudo::root("$buildCmd >> /var/log/zentyal/ltsp.log");
- EBox::Sudo::root('service nbd-server restart');
- } otherwise {
- $ltsp->st_set_string('error', __('Build image failed'));
- print "Build image failed. Check /var/log/zentyal/zentyal.log for details.\n";
- } finally {
- $ltsp->st_set_string('work', 'none');
- };
- } else {
- print "Usage: build-image arch fat?\n";
- }
- $fat-client-desktop & $use-server-desktop = --fat-client
- logging in update-image
- #!/usr/bin/perl -s
- use strict;
- use warnings;
- use EBox;
- use EBox::Global;
- if (scalar @ARGV == 2) {
- my $arch = $ARGV[0];
- my $fat = $ARGV[1];
- my $chroot = ($fat ? "fat-$arch" : $arch);
- if ( -f "/opt/ltsp/images/$chroot.img" ) {
- EBox::init();
- my $ltsp = EBox::Global->modInstance('ltsp');
- $ltsp->st_set_string('work', 'update');
- print "Updating $chroot image...\n";
- my $CHROOT_DIR = "/opt/ltsp/";
- EBox::Sudo::root("echo `date` chroot $CHROOT_DIR$chroot mount -t proc none /proc >> /var/log/zentyal/ltsp.log "
- . "&& chroot $CHROOT_DIR$chroot mount -t proc none /proc >> /var/log/zentyal/ltsp.log "
- . "&& echo `date` chroot $CHROOT_DIR$chroot apt-get update >> /var/log/zentyal/ltsp.log "
- . "&& chroot $CHROOT_DIR$chroot apt-get update >> /var/log/zentyal/ltsp.log "
- . "&& echo `date` chroot $CHROOT_DIR$chroot env LTSP_HANDLE_DAEMONS=false apt-get upgrade -y >> /var/log/zentyal/ltsp.log "
- . "&& chroot $CHROOT_DIR$chroot env LTSP_HANDLE_DAEMONS=false apt-get upgrade -y >> /var/log/zentyal/ltsp.log "
- . "&& echo `date` chroot $CHROOT_DIR$chroot autoremove -y >> /var/log/zentyal/ltsp.log "
- . "&& chroot $CHROOT_DIR$chroot apt-get autoremove -y >> /var/log/zentyal/ltsp.log "
- . "&& echo `date` chroot $CHROOT_DIR$chroot clean >> /var/log/zentyal/ltsp.log "
- . "&& chroot $CHROOT_DIR$chroot apt-get clean >> /var/log/zentyal/ltsp.log "
- . "&& echo `date` umount /opt/ltsp/$chroot/proc >> /var/log/zentyal/ltsp.log "
- . "&& umount /opt/ltsp/$chroot/proc >> /var/log/zentyal/ltsp.log "
- . "&& echo `date` ltsp-update-kernels $CHROOT_DIR$chroot >> /var/log/zentyal/ltsp.log "
- . "&& ltsp-update-kernels $CHROOT_DIR$chroot >> /var/log/zentyal/ltsp.log "
- . "&& echo `date` ltsp-update-image --image-only --arch $chroot >> /var/log/zentyal/ltsp.log "
- . "&& ltsp-update-image --image-only --arch $chroot >> /var/log/zentyal/ltsp.log");
- $ltsp->st_set_string('work', 'none');
- } else {
- print "/opt/ltsp/images/$chroot.img does not exist.\n";
- }
- } else {
- print "Usage: update-image arch fat?\n";
- }
- lsb - Linux Standard Base 4.0 support package
- if you run ltsp-info
- it will tell you no modules loaded
- apt-get install lsb
- also I forgot
- /etc/init.d/zentyal ltsp restart
- * Restarting Zentyal module: ltsp [fail]
- Undefined subroutine &EBox::Types::Select called at /usr/share/perl5/EBox/LTSP/Model/GeneralOpts.pm line 106.
- Also with the script
- env LTSP_HANDLE_DAEMONS=false
- on completion can you turn to =true
- or is a full restart needed ?
- the update-image script have been changed and keeps local to the $arch selected
- build-client writes the kernels and tftboot updates to all images
- haven't found a solution.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement