Advertisement
ArchDukeFerdinand

zentyal 3.0 LTSP ltsp.conf

Sep 17th, 2012
721
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.07 KB | None | 0 0
  1. ltsp.conf
  2. (9:59:41 AM) TedHughes: [default]
  3. (9:59:41 AM) TedHughes: LDM_AUTOLOGIN = False
  4. (9:59:41 AM) TedHughes: LOCAL_APPS_MENU = True
  5. (9:59:41 AM) TedHughes: LDM_ALLOW_GUEST = False
  6. (9:59:41 AM) TedHughes: LDM_LIMIT_ONE_SESSION = False
  7. (9:59:41 AM) TedHughes: FAT_RAM_THRESHOLD = 500
  8. (9:59:41 AM) TedHughes: XKBLAYOUT = us
  9. (9:59:41 AM) TedHughes: LOCAL_APPS = True
  10. (9:59:41 AM) TedHughes: SOUND = True
  11. (9:59:41 AM) TedHughes: LDM_DIRECTX = True
  12. (9:59:41 AM) TedHughes: LTSP_FATCLIENT = TRUE
  13. (9:59:41 AM) TedHughes: LOCALDEV = True
  14. (9:59:41 AM) TedHughes: CONSOLE_KEYMAP = us
  15. (9:59:41 AM) TedHughes: NETWORK_COMPRESSION = False
  16.  
  17. On fat clients the directive LTSP_FATCLIENT = TRUE is missing
  18.  
  19. Also modified the scripts as extra options would be nice.
  20. #!/usr/bin/perl -s
  21.  
  22. use strict;
  23. use warnings;
  24.  
  25. use EBox;
  26. use EBox::Gettext;
  27. use EBox::Global;
  28. use Error qw(:try);
  29.  
  30. if (scalar @ARGV >= 1) {
  31. my $arch = $ARGV[0];
  32. my $fat = $ARGV[1];
  33. my $chroot = ($fat ? "fat-$arch" : $arch);
  34.  
  35. EBox::init();
  36.  
  37. my $ltsp = EBox::Global->modInstance('ltsp');
  38.  
  39. $ltsp->st_set_string('work', 'build');
  40. $ltsp->st_set_string('error', '');
  41.  
  42. print "Building $chroot image...\n";
  43.  
  44. my $buildCmd = "ltsp-build-client --arch $arch --purge-chroot --copy-sourceslist --apt-keys /etc/apt/trusted.gpg";
  45.  
  46. if ($fat) {
  47. $buildCmd .= " --chroot $chroot --fat-client-desktop ubuntu-desktop";
  48.  
  49. }
  50. try {
  51. # TODO: add more messages to ltsp.log (with timestamps)
  52. EBox::Sudo::root("echo `date` $buildCmd >> /var/log/zentyal/ltsp.log");
  53. EBox::Sudo::root("$buildCmd >> /var/log/zentyal/ltsp.log");
  54. EBox::Sudo::root('service nbd-server restart');
  55. } otherwise {
  56. $ltsp->st_set_string('error', __('Build image failed'));
  57. print "Build image failed. Check /var/log/zentyal/zentyal.log for details.\n";
  58. } finally {
  59. $ltsp->st_set_string('work', 'none');
  60. };
  61.  
  62. } else {
  63. print "Usage: build-image arch fat?\n";
  64. }
  65. $fat-client-desktop & $use-server-desktop = --fat-client
  66.  
  67. logging in update-image
  68. #!/usr/bin/perl -s
  69.  
  70. use strict;
  71. use warnings;
  72.  
  73. use EBox;
  74. use EBox::Global;
  75.  
  76. if (scalar @ARGV == 2) {
  77. my $arch = $ARGV[0];
  78. my $fat = $ARGV[1];
  79. my $chroot = ($fat ? "fat-$arch" : $arch);
  80. if ( -f "/opt/ltsp/images/$chroot.img" ) {
  81. EBox::init();
  82.  
  83. my $ltsp = EBox::Global->modInstance('ltsp');
  84.  
  85. $ltsp->st_set_string('work', 'update');
  86. print "Updating $chroot image...\n";
  87.  
  88. my $CHROOT_DIR = "/opt/ltsp/";
  89. EBox::Sudo::root("echo `date` chroot $CHROOT_DIR$chroot mount -t proc none /proc >> /var/log/zentyal/ltsp.log "
  90. . "&& chroot $CHROOT_DIR$chroot mount -t proc none /proc >> /var/log/zentyal/ltsp.log "
  91. . "&& echo `date` chroot $CHROOT_DIR$chroot apt-get update >> /var/log/zentyal/ltsp.log "
  92. . "&& chroot $CHROOT_DIR$chroot apt-get update >> /var/log/zentyal/ltsp.log "
  93. . "&& echo `date` chroot $CHROOT_DIR$chroot env LTSP_HANDLE_DAEMONS=false apt-get upgrade -y >> /var/log/zentyal/ltsp.log "
  94. . "&& chroot $CHROOT_DIR$chroot env LTSP_HANDLE_DAEMONS=false apt-get upgrade -y >> /var/log/zentyal/ltsp.log "
  95. . "&& echo `date` chroot $CHROOT_DIR$chroot autoremove -y >> /var/log/zentyal/ltsp.log "
  96. . "&& chroot $CHROOT_DIR$chroot apt-get autoremove -y >> /var/log/zentyal/ltsp.log "
  97. . "&& echo `date` chroot $CHROOT_DIR$chroot clean >> /var/log/zentyal/ltsp.log "
  98. . "&& chroot $CHROOT_DIR$chroot apt-get clean >> /var/log/zentyal/ltsp.log "
  99. . "&& echo `date` umount /opt/ltsp/$chroot/proc >> /var/log/zentyal/ltsp.log "
  100. . "&& umount /opt/ltsp/$chroot/proc >> /var/log/zentyal/ltsp.log "
  101. . "&& echo `date` ltsp-update-kernels $CHROOT_DIR$chroot >> /var/log/zentyal/ltsp.log "
  102. . "&& ltsp-update-kernels $CHROOT_DIR$chroot >> /var/log/zentyal/ltsp.log "
  103. . "&& echo `date` ltsp-update-image --image-only --arch $chroot >> /var/log/zentyal/ltsp.log "
  104. . "&& ltsp-update-image --image-only --arch $chroot >> /var/log/zentyal/ltsp.log");
  105. $ltsp->st_set_string('work', 'none');
  106. } else {
  107. print "/opt/ltsp/images/$chroot.img does not exist.\n";
  108. }
  109. } else {
  110. print "Usage: update-image arch fat?\n";
  111. }
  112.  
  113. lsb - Linux Standard Base 4.0 support package
  114. if you run ltsp-info
  115. it will tell you no modules loaded
  116. apt-get install lsb
  117.  
  118. also I forgot
  119. /etc/init.d/zentyal ltsp restart
  120. * Restarting Zentyal module: ltsp [fail]
  121. Undefined subroutine &EBox::Types::Select called at /usr/share/perl5/EBox/LTSP/Model/GeneralOpts.pm line 106.
  122.  
  123. Also with the script
  124. env LTSP_HANDLE_DAEMONS=false
  125. on completion can you turn to =true
  126. or is a full restart needed ?
  127.  
  128. the update-image script have been changed and keeps local to the $arch selected
  129. build-client writes the kernels and tftboot updates to all images
  130. haven't found a solution.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement