casper/0000775000000000000000000000000012321311227007215 5ustar casper/hooks/0000775000000000000000000000000012321311227010340 5ustar casper/hooks/casper0000775000000000000000000000355712321311227011555 0ustar #!/bin/sh -e # initramfs hook for casper PREREQS="" # Output pre-requisites prereqs() { echo "$PREREQS" } case "$1" in prereqs) prereqs exit 0 ;; esac . /usr/share/initramfs-tools/hook-functions manual_add_modules unionfs manual_add_modules aufs manual_add_modules overlayfs # unionfs-fuse, if available if [ -x /usr/bin/unionfs-fuse ]; then copy_exec /usr/bin/unionfs-fuse /bin fi # We need losetup copy_exec /sbin/losetup /sbin # Casper hooks mkdir -p ${DESTDIR}/lib/casper copy_exec /usr/share/casper/casper-reconfigure /bin copy_exec /usr/share/casper/casper-preseed /bin copy_exec /usr/share/casper/casper-set-selections /bin mkdir -p ${DESTDIR}/lib/udev/rules.d cp -p /lib/udev/rules.d/60-cdrom_id.rules ${DESTDIR}/lib/udev/rules.d/ copy_exec /lib/udev/cdrom_id /lib/udev copy_exec /usr/bin/eject /bin # cifs boot if [ -x /sbin/mount.cifs ]; then copy_exec /sbin/mount.cifs /sbin for x in cifs md4 des_generic; do manual_add_modules ${x} done fi # squashfs manual_add_modules squashfs manual_add_modules loop # random file system modules manual_add_modules vfat manual_add_modules ext3 manual_add_modules ext4 manual_add_modules btrfs # needed for vfat. :-/ manual_add_modules nls_cp437 manual_add_modules nls_utf8 manual_add_modules nls_iso8859-1 # cdrom modules manual_add_modules sr_mod manual_add_modules ide-cd manual_add_modules sbp2 manual_add_modules ohci1394 # integrity check copy_exec /usr/lib/casper/casper-md5check /bin cp /usr/share/initramfs-tools/scripts/casper-functions $DESTDIR/scripts cp /usr/share/initramfs-tools/scripts/casper-helpers $DESTDIR/scripts auto_add_modules net if [ -e /etc/casper.conf ]; then mkdir -p ${DESTDIR}/etc cp /etc/casper.conf ${DESTDIR}/etc fi if [ "$CASPER_GENERATE_UUID" ]; then # Unique ID mkdir -p $DESTDIR/conf uuidgen -r > $DESTDIR/conf/uuid.conf fi casper/casper-md5check/0000775000000000000000000000000012321311227012153 5ustar casper/casper-md5check/md5.c0000664000000000000000000003022212321311227013003 0ustar /* Copyright (C) 1999, 2000, 2002 Aladdin Enterprises. All rights reserved. This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. L. Peter Deutsch ghost@aladdin.com */ /* $Id: md5.c,v 1.6 2002/04/13 19:20:28 lpd Exp $ */ /* Independent implementation of MD5 (RFC 1321). This code implements the MD5 Algorithm defined in RFC 1321, whose text is available at http://www.ietf.org/rfc/rfc1321.txt The code is derived from the text of the RFC, including the test suite (section A.5) but excluding the rest of Appendix A. It does not include any code or documentation that is identified in the RFC as being copyrighted. The original and principal author of md5.c is L. Peter Deutsch . Other authors are noted in the change history that follows (in reverse chronological order): 2002-04-13 lpd Clarified derivation from RFC 1321; now handles byte order either statically or dynamically; added missing #include in library. 2002-03-11 lpd Corrected argument list for main(), and added int return type, in test program and T value program. 2002-02-21 lpd Added missing #include in test program. 2000-07-03 lpd Patched to eliminate warnings about "constant is unsigned in ANSI C, signed in traditional"; made test program self-checking. 1999-11-04 lpd Edited comments slightly for automatic TOC extraction. 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5). 1999-05-03 lpd Original version. */ #include "md5.h" #include #undef BYTE_ORDER /* 1 = big-endian, -1 = little-endian, 0 = unknown */ #ifdef ARCH_IS_BIG_ENDIAN # define BYTE_ORDER (ARCH_IS_BIG_ENDIAN ? 1 : -1) #else # define BYTE_ORDER 0 #endif #define T_MASK ((md5_word_t)~0) #define T1 /* 0xd76aa478 */ (T_MASK ^ 0x28955b87) #define T2 /* 0xe8c7b756 */ (T_MASK ^ 0x173848a9) #define T3 0x242070db #define T4 /* 0xc1bdceee */ (T_MASK ^ 0x3e423111) #define T5 /* 0xf57c0faf */ (T_MASK ^ 0x0a83f050) #define T6 0x4787c62a #define T7 /* 0xa8304613 */ (T_MASK ^ 0x57cfb9ec) #define T8 /* 0xfd469501 */ (T_MASK ^ 0x02b96afe) #define T9 0x698098d8 #define T10 /* 0x8b44f7af */ (T_MASK ^ 0x74bb0850) #define T11 /* 0xffff5bb1 */ (T_MASK ^ 0x0000a44e) #define T12 /* 0x895cd7be */ (T_MASK ^ 0x76a32841) #define T13 0x6b901122 #define T14 /* 0xfd987193 */ (T_MASK ^ 0x02678e6c) #define T15 /* 0xa679438e */ (T_MASK ^ 0x5986bc71) #define T16 0x49b40821 #define T17 /* 0xf61e2562 */ (T_MASK ^ 0x09e1da9d) #define T18 /* 0xc040b340 */ (T_MASK ^ 0x3fbf4cbf) #define T19 0x265e5a51 #define T20 /* 0xe9b6c7aa */ (T_MASK ^ 0x16493855) #define T21 /* 0xd62f105d */ (T_MASK ^ 0x29d0efa2) #define T22 0x02441453 #define T23 /* 0xd8a1e681 */ (T_MASK ^ 0x275e197e) #define T24 /* 0xe7d3fbc8 */ (T_MASK ^ 0x182c0437) #define T25 0x21e1cde6 #define T26 /* 0xc33707d6 */ (T_MASK ^ 0x3cc8f829) #define T27 /* 0xf4d50d87 */ (T_MASK ^ 0x0b2af278) #define T28 0x455a14ed #define T29 /* 0xa9e3e905 */ (T_MASK ^ 0x561c16fa) #define T30 /* 0xfcefa3f8 */ (T_MASK ^ 0x03105c07) #define T31 0x676f02d9 #define T32 /* 0x8d2a4c8a */ (T_MASK ^ 0x72d5b375) #define T33 /* 0xfffa3942 */ (T_MASK ^ 0x0005c6bd) #define T34 /* 0x8771f681 */ (T_MASK ^ 0x788e097e) #define T35 0x6d9d6122 #define T36 /* 0xfde5380c */ (T_MASK ^ 0x021ac7f3) #define T37 /* 0xa4beea44 */ (T_MASK ^ 0x5b4115bb) #define T38 0x4bdecfa9 #define T39 /* 0xf6bb4b60 */ (T_MASK ^ 0x0944b49f) #define T40 /* 0xbebfbc70 */ (T_MASK ^ 0x4140438f) #define T41 0x289b7ec6 #define T42 /* 0xeaa127fa */ (T_MASK ^ 0x155ed805) #define T43 /* 0xd4ef3085 */ (T_MASK ^ 0x2b10cf7a) #define T44 0x04881d05 #define T45 /* 0xd9d4d039 */ (T_MASK ^ 0x262b2fc6) #define T46 /* 0xe6db99e5 */ (T_MASK ^ 0x1924661a) #define T47 0x1fa27cf8 #define T48 /* 0xc4ac5665 */ (T_MASK ^ 0x3b53a99a) #define T49 /* 0xf4292244 */ (T_MASK ^ 0x0bd6ddbb) #define T50 0x432aff97 #define T51 /* 0xab9423a7 */ (T_MASK ^ 0x546bdc58) #define T52 /* 0xfc93a039 */ (T_MASK ^ 0x036c5fc6) #define T53 0x655b59c3 #define T54 /* 0x8f0ccc92 */ (T_MASK ^ 0x70f3336d) #define T55 /* 0xffeff47d */ (T_MASK ^ 0x00100b82) #define T56 /* 0x85845dd1 */ (T_MASK ^ 0x7a7ba22e) #define T57 0x6fa87e4f #define T58 /* 0xfe2ce6e0 */ (T_MASK ^ 0x01d3191f) #define T59 /* 0xa3014314 */ (T_MASK ^ 0x5cfebceb) #define T60 0x4e0811a1 #define T61 /* 0xf7537e82 */ (T_MASK ^ 0x08ac817d) #define T62 /* 0xbd3af235 */ (T_MASK ^ 0x42c50dca) #define T63 0x2ad7d2bb #define T64 /* 0xeb86d391 */ (T_MASK ^ 0x14792c6e) static void md5_process(md5_state_t *pms, const md5_byte_t *data /*[64]*/) { md5_word_t a = pms->abcd[0], b = pms->abcd[1], c = pms->abcd[2], d = pms->abcd[3]; md5_word_t t; #if BYTE_ORDER > 0 /* Define storage only for big-endian CPUs. */ md5_word_t X[16]; #else /* Define storage for little-endian or both types of CPUs. */ md5_word_t xbuf[16]; const md5_word_t *X; #endif { #if BYTE_ORDER == 0 /* * Determine dynamically whether this is a big-endian or * little-endian machine, since we can use a more efficient * algorithm on the latter. */ static const int w = 1; if (*((const md5_byte_t *)&w)) /* dynamic little-endian */ #endif #if BYTE_ORDER <= 0 /* little-endian */ { /* * On little-endian machines, we can process properly aligned * data without copying it. */ if (!((data - (const md5_byte_t *)0) & 3)) { /* data are properly aligned */ X = (const md5_word_t *)data; } else { /* not aligned */ memcpy(xbuf, data, 64); X = xbuf; } } #endif #if BYTE_ORDER == 0 else /* dynamic big-endian */ #endif #if BYTE_ORDER >= 0 /* big-endian */ { /* * On big-endian machines, we must arrange the bytes in the * right order. */ const md5_byte_t *xp = data; int i; # if BYTE_ORDER == 0 X = xbuf; /* (dynamic only) */ # else # define xbuf X /* (static only) */ # endif for (i = 0; i < 16; ++i, xp += 4) xbuf[i] = xp[0] + (xp[1] << 8) + (xp[2] << 16) + (xp[3] << 24); } #endif } #define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32 - (n)))) /* Round 1. */ /* Let [abcd k s i] denote the operation a = b + ((a + F(b,c,d) + X[k] + T[i]) <<< s). */ #define F(x, y, z) (((x) & (y)) | (~(x) & (z))) #define SET(a, b, c, d, k, s, Ti)\ t = a + F(b,c,d) + X[k] + Ti;\ a = ROTATE_LEFT(t, s) + b /* Do the following 16 operations. */ SET(a, b, c, d, 0, 7, T1); SET(d, a, b, c, 1, 12, T2); SET(c, d, a, b, 2, 17, T3); SET(b, c, d, a, 3, 22, T4); SET(a, b, c, d, 4, 7, T5); SET(d, a, b, c, 5, 12, T6); SET(c, d, a, b, 6, 17, T7); SET(b, c, d, a, 7, 22, T8); SET(a, b, c, d, 8, 7, T9); SET(d, a, b, c, 9, 12, T10); SET(c, d, a, b, 10, 17, T11); SET(b, c, d, a, 11, 22, T12); SET(a, b, c, d, 12, 7, T13); SET(d, a, b, c, 13, 12, T14); SET(c, d, a, b, 14, 17, T15); SET(b, c, d, a, 15, 22, T16); #undef SET /* Round 2. */ /* Let [abcd k s i] denote the operation a = b + ((a + G(b,c,d) + X[k] + T[i]) <<< s). */ #define G(x, y, z) (((x) & (z)) | ((y) & ~(z))) #define SET(a, b, c, d, k, s, Ti)\ t = a + G(b,c,d) + X[k] + Ti;\ a = ROTATE_LEFT(t, s) + b /* Do the following 16 operations. */ SET(a, b, c, d, 1, 5, T17); SET(d, a, b, c, 6, 9, T18); SET(c, d, a, b, 11, 14, T19); SET(b, c, d, a, 0, 20, T20); SET(a, b, c, d, 5, 5, T21); SET(d, a, b, c, 10, 9, T22); SET(c, d, a, b, 15, 14, T23); SET(b, c, d, a, 4, 20, T24); SET(a, b, c, d, 9, 5, T25); SET(d, a, b, c, 14, 9, T26); SET(c, d, a, b, 3, 14, T27); SET(b, c, d, a, 8, 20, T28); SET(a, b, c, d, 13, 5, T29); SET(d, a, b, c, 2, 9, T30); SET(c, d, a, b, 7, 14, T31); SET(b, c, d, a, 12, 20, T32); #undef SET /* Round 3. */ /* Let [abcd k s t] denote the operation a = b + ((a + H(b,c,d) + X[k] + T[i]) <<< s). */ #define H(x, y, z) ((x) ^ (y) ^ (z)) #define SET(a, b, c, d, k, s, Ti)\ t = a + H(b,c,d) + X[k] + Ti;\ a = ROTATE_LEFT(t, s) + b /* Do the following 16 operations. */ SET(a, b, c, d, 5, 4, T33); SET(d, a, b, c, 8, 11, T34); SET(c, d, a, b, 11, 16, T35); SET(b, c, d, a, 14, 23, T36); SET(a, b, c, d, 1, 4, T37); SET(d, a, b, c, 4, 11, T38); SET(c, d, a, b, 7, 16, T39); SET(b, c, d, a, 10, 23, T40); SET(a, b, c, d, 13, 4, T41); SET(d, a, b, c, 0, 11, T42); SET(c, d, a, b, 3, 16, T43); SET(b, c, d, a, 6, 23, T44); SET(a, b, c, d, 9, 4, T45); SET(d, a, b, c, 12, 11, T46); SET(c, d, a, b, 15, 16, T47); SET(b, c, d, a, 2, 23, T48); #undef SET /* Round 4. */ /* Let [abcd k s t] denote the operation a = b + ((a + I(b,c,d) + X[k] + T[i]) <<< s). */ #define I(x, y, z) ((y) ^ ((x) | ~(z))) #define SET(a, b, c, d, k, s, Ti)\ t = a + I(b,c,d) + X[k] + Ti;\ a = ROTATE_LEFT(t, s) + b /* Do the following 16 operations. */ SET(a, b, c, d, 0, 6, T49); SET(d, a, b, c, 7, 10, T50); SET(c, d, a, b, 14, 15, T51); SET(b, c, d, a, 5, 21, T52); SET(a, b, c, d, 12, 6, T53); SET(d, a, b, c, 3, 10, T54); SET(c, d, a, b, 10, 15, T55); SET(b, c, d, a, 1, 21, T56); SET(a, b, c, d, 8, 6, T57); SET(d, a, b, c, 15, 10, T58); SET(c, d, a, b, 6, 15, T59); SET(b, c, d, a, 13, 21, T60); SET(a, b, c, d, 4, 6, T61); SET(d, a, b, c, 11, 10, T62); SET(c, d, a, b, 2, 15, T63); SET(b, c, d, a, 9, 21, T64); #undef SET /* Then perform the following additions. (That is increment each of the four registers by the value it had before this block was started.) */ pms->abcd[0] += a; pms->abcd[1] += b; pms->abcd[2] += c; pms->abcd[3] += d; } void md5_init(md5_state_t *pms) { pms->count[0] = pms->count[1] = 0; pms->abcd[0] = 0x67452301; pms->abcd[1] = /*0xefcdab89*/ T_MASK ^ 0x10325476; pms->abcd[2] = /*0x98badcfe*/ T_MASK ^ 0x67452301; pms->abcd[3] = 0x10325476; } void md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes) { const md5_byte_t *p = data; int left = nbytes; int offset = (pms->count[0] >> 3) & 63; md5_word_t nbits = (md5_word_t)(nbytes << 3); if (nbytes <= 0) return; /* Update the message length. */ pms->count[1] += nbytes >> 29; pms->count[0] += nbits; if (pms->count[0] < nbits) pms->count[1]++; /* Process an initial partial block. */ if (offset) { int copy = (offset + nbytes > 64 ? 64 - offset : nbytes); memcpy(pms->buf + offset, p, copy); if (offset + copy < 64) return; p += copy; left -= copy; md5_process(pms, pms->buf); } /* Process full blocks. */ for (; left >= 64; p += 64, left -= 64) md5_process(pms, p); /* Process a final partial block. */ if (left) memcpy(pms->buf, p, left); } void md5_finish(md5_state_t *pms, md5_byte_t digest[16]) { static const md5_byte_t pad[64] = { 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; md5_byte_t data[8]; int i; /* Save the length before padding. */ for (i = 0; i < 8; ++i) data[i] = (md5_byte_t)(pms->count[i >> 2] >> ((i & 3) << 3)); /* Pad to 56 bytes mod 64. */ md5_append(pms, pad, ((55 - (pms->count[0] >> 3)) & 63) + 1); /* Append the length. */ md5_append(pms, data, 8); for (i = 0; i < 16; ++i) digest[i] = (md5_byte_t)(pms->abcd[i >> 2] >> ((i & 3) << 3)); } casper/casper-md5check/casper-md5check.c0000664000000000000000000002204312321311227015256 0ustar /* casper-md5check - a tool to check md5sums and talk to plymouth (C) Canonical Ltd 2006, 2010 Written by Tollef Fog Heen Ported to plymouth by Steve Langasek This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "md5.h" #define DEBUG #define MD5_LEN 16 static int verbose = 1; static int got_plymouth = 0; static ply_event_loop_t *ply_event_loop = NULL; int set_nocanonical_tty(int fd); void parse_cmdline(void) { FILE *cmdline = fopen("/proc/cmdline", "r"); char buf[1024]; size_t len; char *bufp = buf, *tok; if (!cmdline) return; len = fread(buf, 1023, 1, cmdline); buf[len] = '\0'; while ((tok = strsep(&bufp, " ")) != NULL) { if (strncmp(tok, "quiet", 5) == 0) verbose = 0; } fclose(cmdline); } void plymouth_disconnected(void *user_data, ply_boot_client_t *client) { printf("Disconnected from Plymouth\n"); got_plymouth = 0; ply_event_loop_exit(ply_event_loop, 0); } void plymouth_answer(void *user_data, const char *keys, ply_boot_client_t *client) { ply_event_loop_exit(ply_event_loop, 0); } void plymouth_response(void *user_data, ply_boot_client_t *client) { /* No response */ } void plymouth_failure(ply_boot_client_t *client, char *format, ...) { char *s; va_list argp; va_start(argp, format); vasprintf(&s, format, argp); va_end(argp); if (got_plymouth) { ply_boot_client_tell_daemon_to_display_message(client, s, plymouth_response, plymouth_response, NULL); ply_event_loop_process_pending_events(ply_event_loop); } else if (verbose) printf("%s\n", s); free(s); } void plymouth_text(ply_boot_client_t *client, char *format, ...) { char *s; va_list argp; va_start(argp, format); vasprintf(&s, format, argp); va_end(argp); if (got_plymouth) { ply_boot_client_tell_daemon_to_display_message(client, s, plymouth_response, plymouth_response, NULL); ply_event_loop_process_pending_events(ply_event_loop); } else if (verbose) { printf("%s...", s); fflush(stdout); } free(s); } void plymouth_prompt(ply_boot_client_t *client, char *format, ...) { char *s, *s1; va_list argp; va_start(argp, format); vasprintf(&s, format, argp); va_end(argp); if (got_plymouth) { asprintf(&s1, "keys:%s", s); ply_boot_client_tell_daemon_to_display_message(client, s1, plymouth_response, plymouth_response, NULL); ply_boot_client_ask_daemon_to_watch_for_keystroke(client, NULL, plymouth_answer, (ply_boot_client_response_handler_t)plymouth_answer, NULL); ply_event_loop_run(ply_event_loop); ply_boot_client_attach_to_event_loop(client, ply_event_loop); ply_boot_client_tell_daemon_to_quit(client, 1, plymouth_response, plymouth_response, NULL); ply_event_loop_run(ply_event_loop); } else { printf("%s\n", s); set_nocanonical_tty(0); getchar(); } free(s); } void plymouth_urgent(ply_boot_client_t *client, char *format, ...) { char *s; va_list argp; va_start(argp, format); vasprintf(&s, format, argp); va_end(argp); if (got_plymouth) { ply_boot_client_tell_daemon_to_display_message(client, s, plymouth_response, plymouth_response, NULL); ply_event_loop_process_pending_events(ply_event_loop); } else printf("%s\n", s); free(s); } void plymouth_success(ply_boot_client_t *client, char *format, ...) { char *s; va_list argp; va_start(argp, format); vasprintf(&s, format, argp); va_end(argp); if (got_plymouth) { ply_boot_client_tell_daemon_to_display_message(client, s, plymouth_response, plymouth_response, NULL); ply_event_loop_process_pending_events(ply_event_loop); } else if (verbose) printf("%s\n", s); free(s); } void plymouth_progress(ply_boot_client_t *client, int progress) { static int prevprogress = -1; char *s; if (progress == prevprogress) return; prevprogress = progress; if (got_plymouth) { asprintf(&s, "md5check:verifying:%d", progress); ply_boot_client_update_daemon(client, s, plymouth_response, plymouth_response, NULL); ply_event_loop_process_pending_events(ply_event_loop); free(s); } else { printf("%d%%...", progress); fflush(stdout); } } int set_nocanonical_tty(int fd) { struct termios t; if (tcgetattr(fd, &t) == -1) { perror("tcgetattr"); } t.c_lflag &= ~ICANON; t.c_cc[VMIN] = 1; t.c_cc[VTIME] = 0; return tcsetattr(fd, TCSANOW, &t); } int is_md5sum(const char *checksum) { if (strlen(checksum) != MD5_LEN * 2) return 0; if (strspn(checksum, "0123456789abcdef") != MD5_LEN * 2) return 0; return 1; } int main(int argc, char **argv) { int check_fd; int failed = 0; FILE *md5_file; md5_state_t state; md5_byte_t digest[MD5_LEN]; char hex_output[MD5_LEN * 2 + 1]; char *checksum, *checkfile; ssize_t tsize, csize; ply_boot_client_t *client = NULL; tsize = 0; csize = 0; if (argc != 3) { fprintf(stderr,"Wrong number of arguments\n"); fprintf(stderr,"%s \n", argv[0]); exit(1); } if (chdir(argv[1]) != 0) { perror("chdir"); exit(1); } parse_cmdline(); client = ply_boot_client_new(); if (client) ply_event_loop = ply_event_loop_new(); if (ply_event_loop) ply_boot_client_attach_to_event_loop(client, ply_event_loop); if (!client || !ply_event_loop || !ply_boot_client_connect(client, plymouth_disconnected, NULL)) { /* Fall back to text output */ perror("Connecting to plymouth"); got_plymouth = 0; } else got_plymouth = 1; plymouth_progress(client, 0); plymouth_urgent(client, "Checking integrity, this may take some time"); md5_file = fopen(argv[2], "r"); if (!md5_file) { perror("fopen md5_file"); exit(1); } while (fscanf(md5_file, "%as %a[^\n]", &checksum, &checkfile) == 2) { struct stat statbuf; if (!is_md5sum(checksum)) continue; if (stat(checkfile, &statbuf) == 0) { tsize += statbuf.st_size; } free(checksum); free(checkfile); } rewind(md5_file); while (fscanf(md5_file, "%as %a[^\n]", &checksum, &checkfile) == 2) { char buf[BUFSIZ]; ssize_t rsize; int i; if (!is_md5sum(checksum)) continue; md5_init(&state); plymouth_text(client, "Checking %s", checkfile); check_fd = open(checkfile, O_RDONLY); if (check_fd < 0) { plymouth_failure(client, "%s: %s", checkfile, strerror(errno)); sleep(10); } rsize = read(check_fd, buf, sizeof(buf)); while (rsize > 0) { csize += rsize; plymouth_progress(client, 100*((long double)csize)/tsize); md5_append(&state, (const md5_byte_t *)buf, rsize); rsize = read(check_fd, buf, sizeof(buf)); } close(check_fd); md5_finish(&state, digest); for (i = 0; i < MD5_LEN; i++) sprintf(hex_output + i * 2, "%02x", digest[i]); if (strncmp(hex_output, checksum, strlen(hex_output)) == 0) { plymouth_success(client, "%s: OK", checkfile); } else { plymouth_failure(client, "%s: mismatch", checkfile); failed++; } free(checksum); free(checkfile); } fclose(md5_file); if (failed) { plymouth_urgent(client, "Check finished: errors found in %d files!", failed); } else { plymouth_urgent(client, "Check finished: no errors found"); } plymouth_prompt(client, "Press any key to reboot your system"); reboot(LINUX_REBOOT_CMD_RESTART); return 0; } casper/casper-md5check/md5.h0000664000000000000000000000650012321311227013012 0ustar /* Copyright (C) 1999, 2002 Aladdin Enterprises. All rights reserved. This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. L. Peter Deutsch ghost@aladdin.com */ /* $Id: md5.h,v 1.4 2002/04/13 19:20:28 lpd Exp $ */ /* Independent implementation of MD5 (RFC 1321). This code implements the MD5 Algorithm defined in RFC 1321, whose text is available at http://www.ietf.org/rfc/rfc1321.txt The code is derived from the text of the RFC, including the test suite (section A.5) but excluding the rest of Appendix A. It does not include any code or documentation that is identified in the RFC as being copyrighted. The original and principal author of md5.h is L. Peter Deutsch . Other authors are noted in the change history that follows (in reverse chronological order): 2002-04-13 lpd Removed support for non-ANSI compilers; removed references to Ghostscript; clarified derivation from RFC 1321; now handles byte order either statically or dynamically. 1999-11-04 lpd Edited comments slightly for automatic TOC extraction. 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5); added conditionalization for C++ compilation from Martin Purschke . 1999-05-03 lpd Original version. */ #ifndef md5_INCLUDED # define md5_INCLUDED /* * This package supports both compile-time and run-time determination of CPU * byte order. If ARCH_IS_BIG_ENDIAN is defined as 0, the code will be * compiled to run only on little-endian CPUs; if ARCH_IS_BIG_ENDIAN is * defined as non-zero, the code will be compiled to run only on big-endian * CPUs; if ARCH_IS_BIG_ENDIAN is not defined, the code will be compiled to * run on either big- or little-endian CPUs, but will run slightly less * efficiently on either one than if ARCH_IS_BIG_ENDIAN is defined. */ typedef unsigned char md5_byte_t; /* 8-bit byte */ typedef unsigned int md5_word_t; /* 32-bit word */ /* Define the state of the MD5 Algorithm. */ typedef struct md5_state_s { md5_word_t count[2]; /* message length in bits, lsw first */ md5_word_t abcd[4]; /* digest buffer */ md5_byte_t buf[64]; /* accumulate block */ } md5_state_t; #ifdef __cplusplus extern "C" { #endif /* Initialize the algorithm. */ void md5_init(md5_state_t *pms); /* Append a string to the message. */ void md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes); /* Finish the message and return the digest. */ void md5_finish(md5_state_t *pms, md5_byte_t digest[16]); #ifdef __cplusplus } /* end extern "C" */ #endif #endif /* md5_INCLUDED */ casper/casper-md5check/Makefile0000664000000000000000000000040212321311227013607 0ustar CC=gcc PKG_CONFIG=pkg-config CFLAGS := $(shell getconf LFS_CFLAGS) -Wall -O2 -g $(shell $(PKG_CONFIG) --cflags ply-boot-client) LDLIBS=$(shell $(PKG_CONFIG) --libs ply-boot-client) casper-md5check: casper-md5check.c md5.c clean: rm -f *.o casper-md5check casper/bin/0000775000000000000000000000000012321311227007765 5ustar casper/bin/casper-a11y-enable0000775000000000000000000004642212321311227013175 0ustar #!/bin/sh # # casper-a11y-enable - Sets accessibility profile settings for the live session # or installed system. # # This script is called by several other scripts, as well as ubiquity itself to # set up accessibility profile settings for use in the live environment and on # an installed system. # # Copyright (C) 2011, Canonical Ltd. # # Author: # - Luke Yelavich # # This script is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free # Software Foundation; either version 2 of the License, or at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this application; if not, write to the Free Software Foundation, Inc., 51 # Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ################################################################################## set -e ### PROFILE SETTINGS METHODS BEGIN HERE ### # The methods that are used to set profile data have been placed as close to the # top of this file as possible, so they are easy to locate, and will hopefully # save time when making smaller changes. # Common settings for low vision profiles. Any change you make here will affect # all low vision profiles, for both the user session and login manager. set_common_lowvis() { gset set com.canonical.indicator.datetime show-calendar false gset set org.gnome.desktop.interface toolkit-accessibility true gct -s -t bool /desktop/gnome/interface/accessibility true gct -s -t bool /apps/gksu/disable-grab true gset set org.gnome.yelp show-cursor true } # Common settings for motor profiles. Any change you make here will affect # all motor profiles, for both the user session and login manager. set_common_motor() { gset set org.gnome.desktop.a11y.keyboard enable true gct -s -t bool /apps/gksu/disable-grab true gset set org.gnome.desktop.a11y.keyboard stickykeys-enable true gset set org.gnome.desktop.a11y.keyboard stickykeys-two-key-off false } # Settings for the high-contrast profile. set_high_contrast() { gset set org.gnome.desktop.interface icon-theme HighContrast gset set org.gnome.desktop.interface monospace-font-name "monospace 18" gset set org.gnome.desktop.interface font-name "sans 18" gset set org.gnome.desktop.background picture-uri "" gset set org.gnome.desktop.background picture-options none gset set org.gnome.desktop.background primary-color \#666666 gset set org.gnome.desktop.background secondary-color \#7F7F7F gset set org.gnome.desktop.background color-shading-type solid gset set org.gnome.desktop.interface cursor-size 48 gset set org.gnome.desktop.interface cursor-theme whiteglass kderc_addtoprefixes /usr/share/kubuntu-default-settings/kde-profile/lesser-visual-impairment/ if [ -d $CHROOT_DIR/usr/share/xubuntu-default-settings/accessibility ]; then cp -a $CHROOT_DIR/usr/share/xubuntu-default-settings/accessibility/* $CHROOT_DIR/etc/xdg/ fi if [ -n "$SET_LOGIN" ]; then gset_lightdm set com.canonical.unity-greeter high-contrast true fi } set_magnifier() { # Ubuntu gset set org.gnome.desktop.a11y.applications screen-magnifier-enabled true set_orca_config magnifier # Kubuntu kderc_addtoprefixes /usr/share/kubuntu-default-settings/kde-profile/lesser-visual-impairment/,/usr/share/kubuntu-default-settings/kde-profile/moderate-visual-impairment/ } set_blindness() { gset set org.gnome.desktop.a11y.applications screen-reader-enabled true gset set org.gnome.Empathy.conversation theme classic set_orca_config speech if [ -n "$SET_LOGIN" ]; then gset_lightdm set com.canonical.unity-greeter screen-reader true fi } set_braille() { gset set org.gnome.desktop.a11y.applications screen-reader-enabled true gset set org.gnome.Empathy.conversation theme classic set_orca_config braille if [ -n "$SET_LOGIN" ]; then gset_lightdm set com.canonical.unity-greeter screen-reader true fi } set_keyboard_modifiers() { gset set org.gnome.desktop.a11y.keyboard mousekeys-enable true gset set org.gnome.desktop.a11y.keyboard stickykeys-modifier-beep true gset set org.gnome.settings-daemon.peripherals.keyboard repeat true gset set org.gnome.settings-daemon.peripherals.keyboard delay 700 gset set org.gnome.settings-daemon.peripherals.keyboard repeat-interval 10 kderc_addtoprefixes /usr/share/kubuntu-default-settings/kde-profile/minor-motor-difficulties/ if [ -e $CHROOT_DIR/etc/xdg/xfce4/mcs_settings/keyboard.xml ]; then sed -i 's/0/1/' $CHROOT_DIR/etc/xdg/xfce4/mcs_settings/keyboard.xml fi } set_onscreen_keyboard() { gset set org.gnome.desktop.interface toolkit-accessibility true gset set org.gnome.desktop.a11y.keyboard stickykeys-modifier-beep false gset set org.gnome.desktop.a11y.applications screen-keyboard-enabled true if [ -n "$SET_LOGIN" ]; then gset_lightdm set com.canonical.unity-greeter onscreen-keyboard true fi kderc_addtoprefixes /usr/share/kubuntu-default-settings/kde-profile/minor-motor-difficulties/,/usr/share/kubuntu-default-settings/kde-profile/motor-difficulties-pointing-devices/ if [ -e $CHROOT_DIR/etc/xdg/xfce4/mcs_settings/keyboard.xml ]; then sed -i '/Sticky/ s/0/1/' $CHROOT_DIR/etc/xdg/xfce4/mcs_settings/keyboard.xml fi } ### PROFILE SETTINGS METHODS END HERE ### help() { cat <] [-user=] [-l|-login] [-i|-initramfs] [-d|-debug] -h, -help Display this help. -chroot= Chroot into to apply profile settings, requires a username to be specified, see below. -user= The user where a profile is to be applied, requires the script to be run as root. If no username is given, it is assumed that you wish to apply profile settings for the current user. -l, -login Apply some of the selected profile settings to the login manager. Currently this is hard-coded to lightdm. This requires root privileges. -i, -initramfs Indicate that the script is being called from the initramfs. Allows the script to assume some values that can not otherwise be easily determined in an initramfs environment. Requires that a chroot dir and user name are specified. See above. -script Create a script to be run at system boot that will apply all settings for the specified user and for login. This script will then remove itself. This is needed to work around gsettings not working in a chroot environment with no dconf service running. -d|-debug Enable debugging output. The name of the profile you wish to apply, see below. The profiles currently available are as follows: high-contrast For users with lesser visual impairments who only need a high contrast theme, mouse cursor and icons. magnifier For users with moderate visual impairments who require a screen magnifier. blindness Users who are partially or completely blind who require a screen reader. braille Users who are partially or completely blind who require a screen reader and wish to use a Braille display. keyboard-modifiers Users who have minor motor impairments who require slight changes to the way their keyboard behaves. onscreen-keyboard Users with motor impairments who require the use of an on-screen keyboard. EOF } gset() { if [ -n "$GLIBBIN_VERSION" ]; then if [ -n "$STARTUP_SCRIPT" ]; then echo "gsettings " "$@" >> $CHROOT_DIR/usr/bin/a11y-profile-settings else $DO_CHROOT $DO_SUDO gsettings "$@" fi fi } gset_lightdm() { if [ -n "$GLIBBIN_VERSION" ]; then if [ -n "$STARTUP_SCRIPT" ]; then echo "gsettings " "$@" >> $CHROOT_DIR/usr/bin/a11y-profile-settings-lightdm else $DO_CHROOT sudo -u lightdm gsettings "$@" fi fi } # Soon to be deprecated gct() { if [ -n "$GCONF_VERSION" ]; then if [ -n "$STARTUP_SCRIPT" ]; then echo "gconftool-2 " "$@" >> $CHROOT_DIR/usr/bin/a11y-profile-settings else $DO_CHROOT $DO_SUDO gconftool-2 "$@" fi fi } kderc_addtoprefixes() { if [ -e $CHROOT_DIR/etc/kde4rc ]; then sed -i "s|\\(prefixes=/usr/share/kubuntu-default-settings/kde-profile/default/\\)|\\1,$1|" $CHROOT_DIR/etc/kde4rc fi } # Unfortunately this bloats this script somewhat, but orca doesn't seem to want # to deal with individual settings/a small config fragment. # Arguments: $1 = speech/magnifier/braille (which # accessibility feature to turn on) set_orca_config() { # Yes, we could use $HOME, but enquiring about $HOME is not easy when # Outside the target environment, particularly when running from the # initramfs, and this script is not everything for everybody anyway. if [ -n "$ORCA_VERSION" ] && ! [ -f "$CHROOT_DIR/home/$USER_NAME/.local/share/orca/user-settings.conf" ]; then mkdir -p "$CHROOT_DIR/home/$USER_NAME/.local/share/orca" cat < "$CHROOT_DIR/home/$USER_NAME/.local/share/orca/user-settings.conf" { "pronunciations": {}, "keybindings": {}, "profiles": { "default": { "profile": [ "Default", "default" ], "pronunciations": {}, "keybindings": {} } }, "general": { "speakCellHeaders": true, "magEdgeMargin": 0, "brailleContractionTable": "", "magPointerFollowsFocus": false, "magTextTrackingMode": 2, "magZoomerBorderSize": 1, "brailleAlignmentStyle": 0, "enableEchoByWord": false, "enableMagZoomerColorInversion": false, "magCursorSize": 32, "magSmoothingMode": 0, "magZoomerLeft": 840, "showMainWindow": true, "sayAllStyle": 1, "brailleSelectorIndicator": 192, "presentDateFormat": "%x", "magContrastLevel": 0, "magMouseTrackingMode": 0, "speakCellSpan": true, "progressBarUpdateInterval": 10, "speakCellCoordinates": true, "enablePauseBreaks": true, "brailleEOLIndicator": " $l", "verbalizePunctuationStyle": 1, "progressBarVerbosity": 1, "enableSpeech": false, "enableBraille": false, "chatAnnounceBuddyTyping": false, "speakMultiCaseStringsAsWords": false, "enableBrailleGrouping": false, "readTableCellRow": true, "speechServerFactory": "speechdispatcherfactory", "textAttributesBrailleIndicator": 0, "enableMagCursorExplicitSize": false, "messageVerbosityLevel": 1, "enableMagLiveUpdating": true, "enableSpeechIndentation": false, "enableKeyEcho": true, "magHideCursor": false, "magZoomerBorderColor": "#000000", "magPointerFollowsZoomer": true, "mouseDwellDelay": 0, "magBrightnessLevelRed": 0, "enableMagnifier": false, "magZoomFactor": 4.0, "activeProfile": [ "Default", "default" ], "enableMagZoomerBorder": false, "flashVerbosityLevel": 1, "enableFlashMessages": true, "speechServerInfo": null, "presentToolTips": false, "flashIsPersistent": false, "skipBlankCells": false, "firstStart": false, "largeObjectTextLength": 75, "enableEchoBySentence": false, "magContrastLevelBlue": 0, "magContrastLevelRed": 0, "enableContractedBraille": false, "orcaModifierKeys": [ "Insert", "KP_Insert" ], "enableMagCursor": true, "speechRequiredStateString": "required", "quitOrcaNoConfirmation": false, "brailleRequiredStateString": "required", "magCursorColor": "#000000", "enablePositionSpeaking": false, "magZoomerType": 0, "onlySpeakDisplayedText": false, "enableProgressBarUpdates": true, "wrappedStructuralNavigation": true, "chatRoomHistories": false, "brailleVerbosityLevel": 1, "enableFunctionKeys": true, "enableModifierKeys": true, "magCrossHairColor": "#000000", "enableTutorialMessages": false, "enableActionKeys": true, "speakBlankLines": true, "magColorFilteringMode": 0, "magZoomerRight": 1680, "keyboardLayout": 1, "magTargetDisplay": "", "disableBrailleEOL": false, "magZoomerTop": 0, "magSourceDisplay": "", "enableDiacriticalKeys": false, "enableMnemonicSpeaking": false, "enabledBrailledTextAttributes": "size:; family-name:; weight:400; indent:0; underline:none; strikethrough:false; justification:left; style:normal; text-spelling:none;", "speechVerbosityLevel": 1, "enableMagCrossHair": true, "enableBrailleMonitor": false, "voices": { "default": { "established": false }, "uppercase": { "average-pitch": 5.6 }, "system": { "established": false }, "hyperlink": { "established": false } }, "magContrastLevelGreen": 0, "brailleFlashTime": 5000, "magCrossHairSize": 16, "enableMouseReview": false, "enableNavigationKeys": false, "magBrightnessLevelGreen": 0, "chatSpeakRoomName": false, "startingProfile": [ "Default", "default" ], "enableLockingKeys": true, "profile": [ "Default", "default" ], "brailleRolenameStyle": 1, "brailleLinkIndicator": 192, "enableEchoByCharacter": false, "magBrightnessLevelBlue": 0, "enableBrailleContext": true, "magControlTrackingMode": 2, "magZoomerBottom": 1050, "enablePrintableKeys": true, "enabledSpokenTextAttributes": "size:; family-name:; weight:400; indent:0; underline:none; strikethrough:false; justification:left; style:normal; paragraph-style:; text-spelling:none;", "chatMessageVerbosity": 0, "presentTimeFormat": "%X", "magBrightnessLevel": 0, "presentRequiredState": false, "enableMagCrossHairClip": false } } EOF case "$1" in magnifier) sed -i -e 's/\"enableMagnifier\": false/\"enableMagnifier\": true/' "$CHROOT_DIR/home/$USER_NAME/.local/share/orca/user-settings.conf" ;; speech) sed -i -e 's/\"enableSpeech\": false/\"enableSpeech\": true/' "$CHROOT_DIR/home/$USER_NAME/.local/share/orca/user-settings.conf" ;; braille) sed -i -e 's/\"enableBraille\": false/\"enableBraille\": true/' "$CHROOT_DIR/home/$USER_NAME/.local/share/orca/user-settings.conf" ;; *) ;; esac if [ "$HOME" = "/root" ] || [ -n "$IN_INITRAMFS" ]; then chmod 755 "$CHROOT_DIR/home/$USER_NAME/.local/share/orca" $DO_CHROOT chown $USER_NAME.$USER_NAME -R "/home/$USER_NAME/.local" fi fi } create_conf() { cat < /tmp/casper-a11y.conf UBIQUITY_A11Y_PROFILE=$1 EOF } if [ "$#" = "0" ] || [ "$1" = "-h" ] || [ "$1" = "--help" ]; then help exit 1 fi while [ "$#" -gt 0 ]; do case "$1" in -chroot=*) CHROOT_DIR="${1#-chroot=}" DO_CHROOT="chroot $CHROOT_DIR" shift continue ;; -user=*) USER_NAME="${1#-user=}" DO_SUDO="sudo -u $USER_NAME" shift continue ;; -l|-login) SET_LOGIN=1 shift continue ;; -i|-initramfs) IN_INITRAMFS=1 shift continue ;; -d|-debug) set -x shift continue ;; -script) STARTUP_SCRIPT=1 shift continue ;; *) PROFILE_NAME="$1" shift continue ;; esac done if [ -n "$IN_INITRAMFS" ] && [ -z "$CHROOT_DIR" ]; then echo "Error: In initramfs, but no chroot directory specified." help exit 1 elif [ -n "$IN_INITRAMFS" ] && [ -z "$USER_NAME" ]; then echo "Error: In initramfs, but no username specified." help exit 1 fi if [ -n "$SET_LOGIN" ] && [ "$HOME" != "/root" ] && [ -z "$IN_INITRAMFS" ]; then echo "Error: Setting up accessibility for login requires root privileges." help exit 1 fi if [ -n "$CHROOT_DIR" ] || [ -n "$USER_NAME" ]; then if [ "$HOME" != "/root" ] && [ -z "$IN_INITRAMFS" ]; then echo "Error: You are not running as root." help exit 1 fi fi if [ -n "$CHROOT_DIR" ]; then if [ ! -d "$CHROOT_DIR" ]; then echo "Error: Target chroot directory does not exist, or you do not have permission to access it." exit 1 fi if [ -z "$IN_INITRAMFS" ] && ! type chroot >/dev/null 2>&1 ; then echo "Error: Chroot command not available in running environment." exit 1 fi fi if [ -n "$STARTUP_SCRIPT" ]; then if [ -z "$USER_NAME" ]; then echo "Error: You have requested to create a startup script, but no user was specified." exit 1 fi if [ "$HOME" != "/root" ] && [ -z "$IN_INITRAMFS" ]; then echo "Error: You have requested to create a startup script, but you do not have root" echo "privileges." exit 1 fi if [ -z "$CHROOT_DIR" ]; then echo "Error: You have requested to create a startup script, but you did not specify" echo "a target directory to chroot to." exit 1 fi fi # If no username was entered on the command line, grab the name of the current # user, so we can write files to their home directory. if [ -z "$USER_NAME" ]; then if [ -z "$USER" ]; then USER_NAME="${HOME#/home/}" else USER_NAME="$USER" fi fi # Check to see if a few necessary packages are present in the target # environment. GCONF_VERSION=$($DO_CHROOT /usr/bin/dpkg-query -W --showformat='${Version}' gconf2 2>/dev/null) || GCONF_VERSION="" GLIBBIN_VERSION=$($DO_CHROOT /usr/bin/dpkg-query -W --showformat='${Version}' libglib2.0-bin 2>/dev/null) || GLIBBIN_VERSION="" ORCA_VERSION=$($DO_CHROOT /usr/bin/dpkg-query -W --showformat='${Version}' gnome-orca 2>/dev/null) || ORCA_VERSION="" if [ -n "$STARTUP_SCRIPT" ]; then cat < $CHROOT_DIR/etc/init/a11y-profile-settings.conf # a11y-profile-settings - A job to set up accessibility settings description "Accessibility profile settings" start on runlevel [2345] umask 022 script sudo -u $USER_NAME /usr/bin/dbus-launch --exit-with-session /usr/bin/a11y-profile-settings sudo -u lightdm /usr/bin/dbus-launch --exit-with-session /usr/bin/a11y-profile-settings-lightdm rm /usr/bin/a11y-profile-settings /usr/bin/a11y-profile-settings-lightdm rm /etc/init/a11y-profile-settings.conf end script EOF cat < $CHROOT_DIR/usr/bin/a11y-profile-settings #!/bin/sh # Created by the casper accessibility profile settings script on # $(date). # This script deletes itself once run. EOF cat < $CHROOT_DIR/usr/bin/a11y-profile-settings-lightdm #!/bin/sh # Created by the casper accessibility profile settings script on # $(date). # This script deletes itself once run. EOF fi case $PROFILE_NAME in high-contrast) set_common_lowvis set_high_contrast create_conf $PROFILE_NAME ;; magnifier) set_common_lowvis set_magnifier create_conf $PROFILE_NAME ;; blindness) set_common_lowvis set_blindness create_conf screen-reader ;; braille) set_common_lowvis set_braille create_conf $PROFILE_NAME ;; keyboard-modifiers) set_common_motor set_keyboard_modifiers create_conf $PROFILE_NAME ;; onscreen-keyboard) set_common_motor set_onscreen_keyboard create_conf $PROFILE_NAME ;; esac if [ -n "$STARTUP_SCRIPT" ]; then chmod 755 $CHROOT_DIR/usr/bin/a11y-profile-settings* fi casper/bin/casper-preseed0000775000000000000000000000067712321311227012627 0ustar #! /bin/sh set -e PATH=/usr/sbin:/usr/bin:/sbin:/bin # Only do this once. if [ -z "$DEBCONF_REDIR" ]; then exec <&4 export DEBIAN_HAS_FRONTEND=1 export DEBCONF_REDIR=1 fi root="$1" . "$root/usr/share/debconf/confmodule" question="$2" value="$3" seen="$4" [ "$seen" ] || seen=true if ! db_set "$question" "$value"; then db_register debian-installer/dummy "$question" db_set "$question" "$value" fi db_fset "$question" seen "$seen" exit 0 casper/bin/casper-set-selections0000775000000000000000000000375712321311227014143 0ustar #!/bin/sh # Cloned-and-hacked from preseed/debconf-set-selections for casper. set -e OLDIFS="$IFS" CR=$(echo -en "\r") NL=" " . /scripts/casper-functions load_confmodule # Returns the first field in the current line first_field() { echo "$line" | grep -q "[[:space:]]" || return 1 echo "$line" | sed -r 's/^([^[:space:]]*).*/\1/' } # Returns any fields after the first field in the current line rest_line() { if echo "$line" | grep -q "[[:space:]]"; then echo "$line" | sed 's/^[^[:space:]]*[[:space:]]*//' fi } SEEN=1 if [ "$1" = --unseen ]; then SEEN= shift fi file="$1" parse_error() { echo "Error parsing preconfiguration file: $*" >&2 exit 1 } IFS="$NL" multiline="" # TODO: this squashes \r elsewhere in the line too for line in $(grep -v '^#\|^[[:space:]]*$' "$file" | sed "s/$CR//g"); do IFS="$OLDIFS" line="$(echo "$line" | sed 's/^[[:space:]]*//')" if echo "$line" | grep -q '\\$'; then multiline="${multiline:+$multiline }$(echo "$line" | \ sed 's/[[:space:]]*\\$//')" continue elif [ -n "$multiline" ]; then line="$multiline $line" multiline="" fi echo "$line" >>/tmp/casper-preseed.log package="" var="" type="" val="" if ! package="$(first_field)"; then parse_error "Syntax error: unable to determine template owner" fi line="$(rest_line)" if ! var="$(first_field)"; then parse_error "Syntax error: unable to determine template name" fi line="$(rest_line)" if ! type="$(first_field)"; then # Allow for lines without separator before an empty value if [ "$line" ]; then type="$line" else parse_error "Syntax error: unable to determine template type" fi fi line="$(rest_line)" val="$line" if [ "$type" = seen ]; then # Set seen flag. db_fset "$var" "$type" "$val" || true # how to handle this error? else if ! db_set "$var" "$val"; then # Question does not exist yet. db_register debian-installer/dummy "$var" db_set "$var" "$val" db_subst "$var" ID "$var" fi if [ "$SEEN" ]; then db_fset "$var" seen true fi fi done casper/bin/casper-update-initramfs0000775000000000000000000000201012321311227014433 0ustar #! /bin/sh set -e if [ -f /cdrom/casper/vmlinuz ]; then # If /cdrom is mounted but not writable, just exit : >> "/cdrom/casper/vmlinuz" > /dev/null 2>&1 || exit 0 # If UBIQUITY_ONLY is set in the environment, also exit [ -n "$UBIQUITY_ONLY" ] && exit 0 fi update-initramfs.distrib "$@" if [ -e /initrd.img ]; then bootdir= else bootdir=/boot fi # initrd.img may exist when vmlinuz doesn't; for example, if # update-initramfs is run on a fresh live USB stick without upgrading the # kernel. if [ -e "$bootdir/initrd.img" ]; then if [ -e /cdrom/casper/initrd.lz ]; then zcat "$bootdir/initrd.img" | lzma -9c >/cdrom/casper/initrd.lz.new mv /cdrom/casper/initrd.lz.new /cdrom/casper/initrd.lz else cp "$bootdir/initrd.img" /cdrom/casper/initrd.gz.new mv /cdrom/casper/initrd.gz.new /cdrom/casper/initrd.gz fi fi if [ -e "$bootdir/vmlinuz" ]; then cp "$bootdir/vmlinuz" /cdrom/casper/vmlinuz.new mv /cdrom/casper/vmlinuz.new /cdrom/casper/vmlinuz fi exit 0 casper/bin/casper-new-uuid0000775000000000000000000000524612321311227012732 0ustar #!/bin/sh # -*- coding: utf-8 -*- # # «casper-new-uuid» - Creates and injects new UUIDs for casper disks # # Create new UUIDs for disks to prevent conflicts and booting the wrong casper # directory. Particularly useful in creating recovery disks that need to be # able to also work with recovery partitioning schemes. # # Copyright (C) 2008, Dell Inc. # # Author: # - Mario Limonciello # # This script is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free # Software Foundation; either version 2 of the License, or at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this application; if not, write to the Free Software Foundation, Inc., 51 # Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ################################################################################## set -e help() { echo echo "USAGE: $0 initrd.{l,g}z " echo echo "initrd.{l,g}z is the absolute path to the original gzipped or lzmaed initramfs" echo " is the destination directory for the new compressed initramfs" echo " is the destination directory for the new casper-uuid-TYPE " echo echo "if either path is absent, they will end up in the current directory " echo "TYPE is determined by an already existing casper-uuid-* or by 'uname -s'" } if [ "$#" = "0" ] || [ "x$1" = x-h ] || [ "x$1" = x--help ]; then help exit 3 fi CWD=`pwd` TEMPDIR=`mktemp -d /tmp/uuid-XXXXXX` TYPE=`uname -r | cut -d '-' -f 3` if echo "$1" | grep ".lz$" >/dev/null; then COMPRESSOR="lzma" SUFFIX=".lz" elif echo "$1" | grep ".gz$" >/dev/null; then COMPRESSOR="gzip" SUFFIX=".gz" else echo "Unsupported archive type." exit 2 fi if [ -z "$2" ] || [ ! -d "$2" ] || [ "$2" = "." ]; then COMPRESS_DIR="$CWD" else COMPRESS_DIR="$2" fi if [ -z "$3" ] || [ ! -d "$3" ] || [ "$3" = "." ]; then CASPERDIR="$CWD" else CASPERDIR="$3" fi cd "$TEMPDIR" $COMPRESSOR -cd "$1" -S "$SUFFIX" | cpio -id uuidgen -r > conf/uuid.conf find . | cpio --quiet --dereference -o -H newc | $COMPRESSOR -9c > "$COMPRESS_DIR/initrd$SUFFIX" if [ "$(ls "$CASPERDIR/casper-uuid"-* >/dev/null 2>&1 | wc -l)" = 1 ]; then cp conf/uuid.conf "$CASPERDIR/casper-uuid"-* else cp conf/uuid.conf "$CASPERDIR/casper-uuid-$TYPE" fi cd "$CWD" rm -rf "$TEMPDIR" casper/bin/casper-getty0000775000000000000000000000041412321311227012321 0ustar #! /bin/sh autologin=1 for opt in "$@" ; do if [ "$opt" = "-l" -o "$opt" = "-n" ] ; then autologin=0 fi done if [ "$autologin" = "1" ] ; then exec /sbin/getty -n -l /sbin/casper-login $* else exec /sbin/getty $* fi casper/bin/casper-login0000775000000000000000000000014612321311227012277 0ustar #! /bin/sh USERNAME=root [ -f /etc/casper.conf ] && . /etc/casper.conf exec /bin/login -f $USERNAME casper/bin/casper-reconfigure0000775000000000000000000000207612321311227013503 0ustar #! /bin/sh set -e export PATH=/usr/bin:/usr/sbin:/sbin:/bin frontend=noninteractive findcommandinroot() { ROOT="$1/" shift while [ "$#" -ge 1 ]; do P="$PATH" while [ "$P" ]; do D=${P%%:*} P=${P#*:} if [ "$D" = "$P" ]; then P= fi if [ -z "$D" ]; then D=. fi if [ -x "$ROOT$D/$1" ]; then echo "$D/$1" return 0 fi done shift done return 1 } runcommandinroot() { C=$(findcommandinroot "$1" "$2") ROOT="$1" shift shift [ -n "$C" ] && chroot "$ROOT" "$C" "$@" } root="$1" package="$2" version=$(runcommandinroot "$root" dpkg-query -W --showformat='${Version}' "$package" 2>/dev/null) || version="" if [ -z "$version" ]; then echo >&2 "$0: package '$package' is not installed" exit 0 fi unset DEBIAN_HAS_FRONTEND unset DEBIAN_FRONTEND unset DEBCONF_REDIR runcommandinroot "$root" dpkg-reconfigure -fnoninteractive --no-reload "$package" exit 0 casper/bin/casper-snapshot0000775000000000000000000001647212321311227013037 0ustar #! /bin/bash # casper-snapshot - utility to manage Debian Live systems snapshots # # This program mount a device (fallback to /tmpfs under /mnt/snapshot # and save the /cow (or a different dir) filesystem in it for reusing # in another casper session. Look at manpage for more info. # # Copyright (C) 2006 Marco Amadori # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # On Debian systems, the complete text of the GNU General Public License # can be found in /usr/share/common-licenses/GPL file. PROGRAM="`basename $0`" VERSION=0.0.1 # Source casper conf if [ -e /etc/casper.conf ]; then . /etc/casper.conf else USERNAME=$(cat /etc/passwd | grep "999" | cut -f1 -d ':') HOSTNAME=$(hostname) BUILD_SYSTEM="Debian" fi export USERNAME USERFULLNAME HOSTNAME BUILD_SYSTEM # Source helper functions helpers="/usr/share/initramfs-tools/scripts/casper-helpers" if [ -e "${helpers}" ]; then . "${helpers}" else echo "Error: I cannot found helper functions \"${helpers}\"." exit 1 fi # Define LSB log_* functions. # Depend on lsb-base (>= 3.0-6) to ensure that this file is present. . /lib/lsb/init-functions MOUNTP="" COW="" DEV="" DEST="" TYPE="" DESKTOP_LINK="" Header () { echo "${PROGRAM} - utility to do Debian Live snapshots" echo echo "Usage: ${PROGRAM} [-c|--cow DIRECTORY] [-d|--device DEVICE] [-o|--output FILE] [-t|--type TYPE]" echo "Usage: ${PROGRAM} [-r|--resync-string STRING]" echo "Usage: ${PROGRAM} [-h|--help]" echo "Usage: ${PROGRAM} [-u|--usage]" echo "Usage: ${PROGRAM} [-v|--version]" } Usage () { MESSAGE=${1} Header echo echo "Try \"${PROGRAM} --help\" for more information." if [ ! -z "${MESSAGE}" ]; then echo -e "${MESSAGE}" exit 1 else exit 0 fi } Help () { Header echo echo "Options:" echo " -c, --cow: specifies the copy on write directory (default: /cow)." echo " -d, --device: specifies the output snapshot device (default: none)." echo " -o, --output: specifies the output image file (default: $type dependent)." echo " -r, --resync-string: internally used to resync previous made snapshots." echo " -t, --type: specifies the snapshot type between \"squashfs\", \"ext2\" or \"cpio\".gz archive (default: cpio)" echo -e "\nLook at casper-snapshot(1) man page for more information." exit 0 } Version () { echo "${PROGRAM}, version ${VERSION}" echo echo "Copyright (C) 2006 Marco Amadori " echo echo "This program is free software; you can redistribute it and/or modify" echo "it under the terms of the GNU General Public License as published by" echo "the Free Software Foundation; either version 2 of the License, or" echo "(at your option) any later version." echo echo "This program is distributed in the hope that it will be useful," echo "but WITHOUT ANY WARRANTY; without even the implied warranty of" echo "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the" echo "GNU General Public License for more details." echo echo "You should have received a copy of the GNU General Public License" echo "along with this program; if not, write to the Free Software" echo "Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA" echo echo "On Debian systems, the complete text of the GNU General Public License" echo "can be found in /usr/share/common-licenses/GPL file." echo echo "Homepage: " exit 0 } Do_snapshot () { case "${TYPE}" in squashfs) echo "./tmp/exclude_list" > /tmp/exclude_list ( cd "${COW}" && find . -name '*.wh.*' >> /tmp/exclude_list ) mksquashfs "${COW}" "${DEST}" -ef /tmp/exclude_list || exit 1 rm /tmp/exclude_list ;; cpio) ( cd "${COW}" && find . -path '*.wh.*' -prune -o -print0 | cpio --quiet -o0 -H newc | gzip -9c > "${DEST}" ) || exit 1 ;; ext2) DU_DIM="`du -ks ${COW} | cut -f1`" REAL_DIM="`expr ${DU_DIM} + ${DU_DIM} / 20`" # Just 5% more to be sure, need something more sophistcated here... genext2fs --size-in-blocks=${REAL_DIM} --reserved-percentage=0 --root="${COW}" "${DEST}" || exit 1 ;; *) echo "Internal error." exit 1 ;; esac } Is_same_mount () { dir1="`Base_path $1`" dir2="`Base_path $2`" if [ "${dir1}" == "${dir2}" ]; then return 0 else return 1 fi } Parse_args () { # Parse command line ARGUMENTS="`getopt --longoptions cow:,device:,output,resync-string:,type:,help,usage,version --name=${PROGRAM} --options c:d:o:t:r:,h,u,v --shell sh -- "$@"`" if [ "$?" != "0" ]; then echo "Terminating." >&2 exit 1 fi eval set -- "${ARGUMENTS}" while true; do case "$1" in -c|--cow) SNAP_COW="$2"; shift 2 ;; -d|--device) SNAP_DEV="$2"; shift 2 ;; -o|--output) SNAP_OUTPUT="$2"; shift 2 ;; -t|--type) SNAP_TYPE="$2"; shift 2 ;; -r|--resync-string) SNAP_RSTRING="$2"; break ;; -h|--help) Help; shift ;; -u|--usage) Usage ; shift ;; -v|--version) Version; shift ;; --) shift; break ;; *) echo "Internal error."; exit 1 ;; esac done } Mount_device () { dev="$1" if [ ! -d "${MOUNTP}" ]; then mkdir -p "${MOUNTP}" fi if [ -z "${dev}" ]; then # create a temp mount -t tmpfs -o rw tmpfs "${MOUNTP}" if [ ! -L /home/$USERNAME/Desktop/casper-snapshot ]; then ln -s "${MOUNTP}" /home/$USERNAME/Desktop/casper-snapshot fi else if [ -b "${dev}" ] ; then try_mount "${dev}" "${MOUNTP}" rw || panic "failed to mount ${dev}" fi fi } Defaults () { MOUNTP="/mnt/casper-snapshot" COW="/cow" DEV="" TYPE="cpio" DESKTOP_LINK=/home/$USERNAME/Desktop/casper-snapshot if [ -n "${SNAP_RSTRING}" ]; then COW=$(echo "${SNAP_RSTRING}" | cut -f1 -d ':') DEV=$(echo "${SNAP_RSTRING}" | cut -f2 -d ':') DEST="${MOUNTP}/$(echo "${SNAP_RSTRING}" | cut -f3 -d ':')" case "${DEST}" in *.cpio.gz) TYPE="cpio" ;; *.squashfs) TYPE="squashfs" ;; "") TYPE="ext2" ;; *.ext2) TYPE="ext2" ;; *) Usage "Unrecognized String" ;; esac else DEF_COW="/cow" # Bad options handling if [ -z "${SNAP_COW}" ]; then COW="${DEF_COW}" else COW="${SNAP_COW}" fi case "${SNAP_TYPE}" in "cpio"|"squashfs"|"ext2") TYPE="${SNAP_TYPE}" ;; "") TYPE="cpio" ;; *) Usage "Error: unrecognized snapshot type" ;; esac case "${TYPE}" in cpio) DEST="${MOUNTP}/casper-sn.cpio.gz" ;; squashfs) DEST="${MOUNTP}/casper-sn.squashfs" ;; ext2) DEST="${MOUNTP}/casper-sn.ext2" ;; *) echo "Internal error." exit 1 ;; esac #if [ -d #if Is_same_mount fi # check vars if [ ! -d "${COW}" ]; then Usage "Error: ${COW} is not a directory" fi Mount_device $DEV } Clean () { if [ -n "$DEV" ]; then umount "${MOUNTP}" rmdir "${MOUNTP}" rm fi } Main () { Parse_args "$@" Defaults Do_snapshot Clean } Main "$@" casper/conf-hooks.d/0000775000000000000000000000000012321311227011505 5ustar casper/conf-hooks.d/casper0000664000000000000000000000022712321311227012706 0ustar # Declare that we need a framebuffer included in the initramfs; live CD # booting is slow, and casper-md5check requires a splash screen. FRAMEBUFFER=y casper/Makefile0000664000000000000000000000062612321311227010661 0ustar # Looking in which build system we are BUILD_SYSTEM := $(shell lsb_release --short --id) all: # Setting BUILD_SYSTEM in the binary package sed -i -e 's/\(BUILD_SYSTEM="\).*"/\1'$(BUILD_SYSTEM)'"/g' casper.conf $(MAKE) -C casper-md5check set -e; \ for x in bin/* scripts/casper scripts/casper-bottom/* \ ubiquity-hooks/*; do \ sh -n $$x; \ done clean: $(MAKE) -C casper-md5check clean casper/casper.conf0000664000000000000000000000066512321311227011350 0ustar # This file should go in /etc/casper.conf # Supported variables are: # USERNAME, USERFULLNAME, HOST, BUILD_SYSTEM, FLAVOUR export USERNAME="ubuntu" export USERFULLNAME="Live session user" export HOST="ubuntu" export BUILD_SYSTEM="Ubuntu" # USERNAME and HOSTNAME as specified above won't be honoured and will be set to # flavour string acquired at boot time, unless you set FLAVOUR to any # non-empty string. # export FLAVOUR="Ubuntu" casper/ubiquity-hooks/0000775000000000000000000000000012321311227012211 5ustar casper/ubiquity-hooks/25modules0000775000000000000000000000014612321311227013757 0ustar #! /bin/sh set -e if [ -f /etc/modules ]; then cp -a /etc/modules /target/etc/modules fi exit 0 casper/ubiquity-hooks/20xconfig0000775000000000000000000000043412321311227013737 0ustar #! /bin/sh set -e if [ -f /etc/X11/xorg.conf ]; then cp -a /etc/X11/xorg.conf /target/etc/X11/xorg.conf # requires x11-common (>= 7.0.0-0ubuntu1) mkdir -p /target/var/lib/x11 chroot /target sh -c 'md5sum /etc/X11/xorg.conf > /var/lib/x11/xorg.conf.md5sum' fi exit 0 casper/ubiquity-hooks/49kubuntu_gnome_icon_cache0000775000000000000000000000055712321311227017340 0ustar #! /bin/sh set -e # livecd-rootfs deletes the Gnome icon cache for Kubuntu CDs to save space, recreate it here if [ -e "/target/usr/share/kubuntu-default-settings/" ] && [ -e "/target/usr/bin/gtk-update-icon-cache" ]; then chroot /target gtk-update-icon-cache /usr/share/icons/hicolor chroot /target gtk-update-icon-cache /usr/share/icons/oxygen fi exit 0 casper/ubiquity-hooks/30accessibility0000775000000000000000000000604212321311227015133 0ustar #!/bin/sh # If you are looking to change accessibility profile settings, plesae look in # bin/casper-a11y-enable. . /usr/share/debconf/confmodule . /etc/casper.conf PREREQ="" DESCRIPTION="Configuring accessibility options..." db_get passwd/username TARGET_USERNAME="$RET" copy_orca_config() { if [ -f /home/$USERNAME/.local/share/orca/user-settings.conf ]; then mkdir -p /target/home/$TARGET_USERNAME/.local/share mkdir -p /target/var/lib/lightdm/.local/share cp -r /home/$USERNAME/.local/share/orca /target/home/$TARGET_USERNAME/.local/share cp -r /home/$USERNAME/.local/share/orca /target/var/lib/lightdm/.local/share chroot /target chown -R $TARGET_USERNAME.$TARGET_USERNAME /home/$TARGET_USERNAME/.local chroot /target chown -R lightdm.lightdm /var/lib/lightdm/.local chmod 755 /target/home/$TARGET_USERNAME/.local/share/orca chmod 755 /target/var/lib/lightdm/.local/share/orca fi } for x in $(cat /proc/cmdline); do case $x in # Lesser Visual Impairment access=v1) /usr/bin/casper-a11y-enable -login -user="$TARGET_USERNAME" -chroot=/target -script high-contrast exit ;; # Moderate Visual Impairment access=v2) /usr/bin/casper-a11y-enable -login -user="$TARGET_USERNAME" -chroot=/target -script magnifier exit ;; # Blindness access=v3) copy_orca_config /usr/bin/casper-a11y-enable -login -user="$TARGET_USERNAME" -chroot=/target -script blindness exit ;; # Braille braille=ask) copy_orca_config /usr/bin/casper-a11y-enable -login -user="$TARGET_USERNAME" -chroot=/target -script braille exit ;; # Minor Motor Difficulties access=m1) /usr/bin/casper-a11y-enable -login -user="$TARGET_USERNAME" -chroot=/target -script keyboard-modifiers exit ;; # Motor Difficulties - pointing devices access=m2) /usr/bin/casper-a11y-enable -login -user="$TARGET_USERNAME" -chroot=/target -script onscreen-keyboard exit ;; esac done if [ -z "$UBIQUITY_A11Y_PROFILE" ] && [ -f /tmp/casper-a11y.conf ]; then . /tmp/casper-a11y.conf fi case "$UBIQUITY_A11Y_PROFILE" in # Lesser Visual Impairment high-contrast) /usr/bin/casper-a11y-enable -login -user="$TARGET_USERNAME" -chroot=/target -script high-contrast ;; # Moderate Visual Impairment magnifier) /usr/bin/casper-a11y-enable -login -user="$TARGET_USERNAME" -chroot=/target -script magnifier ;; # Blindness screen-reader) copy_orca_config /usr/bin/casper-a11y-enable -login -user="$TARGET_USERNAME" -chroot=/target -script blindness ;; # Braille braille) copy_orca_config /usr/bin/casper-a11y-enable -login -user="$TARGET_USERNAME" -chroot=/target -script braille ;; # Minor Motor Difficulties keyboard-modifiers) /usr/bin/casper-a11y-enable -login -user="$TARGET_USERNAME" -chroot=/target -script keyboard-modifiers ;; # Motor Difficulties - pointing devices onscreen-keyboard) /usr/bin/casper-a11y-enable -login -user="$TARGET_USERNAME" -chroot=/target -script onscreen-keyboard ;; esac casper/ubiquity-hooks/22gnome_panel_data0000775000000000000000000000014512321311227015560 0ustar #! /bin/sh set -e if laptop-detect; then casper-reconfigure /target gnome-panel-data fi exit 0 casper/ubiquity-hooks/32gnome_power_manager0000775000000000000000000000011212321311227016311 0ustar #! /bin/sh set -e casper-reconfigure /target gnome-power-manager exit 0 casper/ubiquity-hooks/40install_driver_updates0000775000000000000000000000113212321311227017046 0ustar #! /bin/sh set -e if [ ! -d /var/cache/driver-updates ]; then exit 0 fi install_dir=/var/cache/driver-updates trap "rm -rf /target$install_dir" EXIT HUP INT QUIT TERM mkdir -p "/target$install_dir" cp -a /var/cache/driver-updates/*.deb "/target$install_dir/" || exit 0 # We cannot leave packages in a bad state. So if the install fails, remove # it. This will get caught in /var/log/syslog. for deb in "/target$install_dir"/*; do [ -f "$deb" ] || continue debbase="${deb##*/}" if ! chroot /target dpkg -i "$install_dir/$debbase"; then chroot /target dpkg -P "${debbase%%_*}" fi done exit 0 casper/ubiquity-hooks/45jackd20000775000000000000000000000075612321311227013456 0ustar #!/bin/sh set -e . /usr/share/debconf/confmodule if db_get jackd/tweak_rt_limits; then # Using DEBCONF_DB_REPLACE is a hack to force configdb to be # read-only, which debconf-copydb doesn't currently arrange for # itself. DEBCONF_DB_REPLACE=configdb debconf-copydb configdb targetdb \ -p jackd/tweak_rt_limits \ --config=Name:targetdb --config=Driver:File \ --config=Mode:0644 \ --config=Filename:/target/var/cache/debconf/config.dat casper-reconfigure /target jackd2 fi exit 0 casper/COPYING0000664000000000000000000004310312321311227010251 0ustar GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. casper/scripts/0000775000000000000000000000000012321311227010704 5ustar casper/scripts/casper0000664000000000000000000006200612321311227012110 0ustar #!/bin/sh # set -e export PATH=/usr/bin:/usr/sbin:/bin:/sbin mountpoint=/cdrom LIVE_MEDIA_PATH=casper [ -f /conf/uuid.conf ] && UUID="$(cat /conf/uuid.conf)" root_persistence="casper-rw" home_persistence="home-rw" root_snapshot_label="casper-sn" home_snapshot_label="home-sn" USERNAME=casper USERFULLNAME="Live session user" HOST=live BUILD_SYSTEM=Custom mkdir -p $mountpoint tried=/tmp/tried [ -f /etc/casper.conf ] && . /etc/casper.conf export USERNAME USERFULLNAME HOST BUILD_SYSTEM . /scripts/casper-helpers if [ ! -f /casper.vars ]; then touch /casper.vars fi parse_cmdline() { for x in $(cat /proc/cmdline); do case $x in showmounts|show-cow) export SHOWMOUNTS='Yes' ;; persistent) export PERSISTENT="Yes" ;; nopersistent) export PERSISTENT="" ;; persistent-path=*) export PERSISTENT_PATH="${x#persistent-path=}" ;; union=*) export UNIONFS="${x#union=}";; ip=*) STATICIP=${x#ip=} if [ "${STATICIP}" = "" ]; then STATICIP="frommedia" fi export STATICIP ;; uuid=*) UUID=${x#uuid=} ;; ignore_uuid) UUID="" ;; live-media=*) LIVEMEDIA="${x#live-media=}" export LIVEMEDIA echo "export LIVEMEDIA=\"$LIVEMEDIA\"" >> /etc/casper.conf ;; live-media-path=*) LIVE_MEDIA_PATH="${x#live-media-path=}" export LIVE_MEDIA_PATH echo "export LIVE_MEDIA_PATH=\"$LIVE_MEDIA_PATH\"" >> /etc/casper.conf ;; toram) export TORAM="Yes" ;; todisk=*) export TODISK="${x#todisk=}" ;; hostname=*) export CMD_HOST="${x#hostname=}" ;; userfullname=*) export CMD_USERFULLNAME="${x#userfullname=}" ;; username=*) export CMD_USERNAME="${x#username=}" ;; esac done if [ "${UNIONFS}" = "" ]; then export UNIONFS="DEFAULT" fi } is_casper_path() { path=$1 if [ -d "$path/$LIVE_MEDIA_PATH" ]; then if [ "$(echo $path/$LIVE_MEDIA_PATH/*.squashfs)" != "$path/$LIVE_MEDIA_PATH/*.squashfs" ] || [ "$(echo $path/$LIVE_MEDIA_PATH/*.ext2)" != "$path/$LIVE_MEDIA_PATH/*.ext2" ] || [ "$(echo $path/$LIVE_MEDIA_PATH/*.dir)" != "$path/$LIVE_MEDIA_PATH/*.dir" ]; then return 0 fi fi return 1 } matches_uuid() { if [ -z "$UUID" ]; then return 0 fi path="$1" for try_uuid_file in "$path/.disk/casper-uuid"*; do [ -e "$try_uuid_file" ] || continue try_uuid="$(cat "$try_uuid_file")" if [ "$UUID" = "$try_uuid" ]; then return 0 fi done return 1 } get_backing_device() { case "$1" in *.squashfs|*.ext2) echo $(setup_loop "$1" "loop" "/sys/block/loop*") ;; *.dir) echo "directory" ;; *) panic "Unrecognized casper filesystem: $1" ;; esac } match_files_in_dir() { # Does any files match pattern $1 ? local pattern="$1" if [ "$(echo $pattern)" != "$pattern" ]; then return 0 fi return 1 } mount_images_in_directory() { directory="$1" rootmnt="$2" if match_files_in_dir "$directory/$LIVE_MEDIA_PATH/*.squashfs" || match_files_in_dir "$directory/$LIVE_MEDIA_PATH/*.ext2" || match_files_in_dir "$directory/$LIVE_MEDIA_PATH/*.dir"; then setup_unionfs "$directory/$LIVE_MEDIA_PATH" "$rootmnt" else : fi } is_nice_device() { sysfs_path="${1#/sys}" if /sbin/udevadm info --query=all --path="${sysfs_path}" | egrep -q "DEVTYPE=disk"; then return 0 fi if echo ${sysfs_path} | grep -q "^/block/dm-"; then return 0 fi return 1 } copy_live_to() { copyfrom="${1}" copytodev="${2}" copyto="${copyfrom}_swap" size=$(fs_size "" ${copyfrom} "used") if [ "${copytodev}" = "ram" ]; then # copying to ram: freespace=$(awk '/^MemFree:/{f=$2} /^Cached:/{c=$2} END{print f+c}' /proc/meminfo) mount_options="-o size=${size}k" free_string="memory" fstype="tmpfs" dev="/dev/shm" else # it should be a writable block device if [ -b "${copytodev}" ]; then dev="${copytodev}" free_string="space" fstype=$(get_fstype "${dev}") freespace=$(fs_size "${dev}") else [ "$quiet" != "y" ] && log_warning_msg "${copytodev} is not a block device." return 1 fi fi if [ "${freespace}" -lt "${size}" ] ; then [ "$quiet" != "y" ] && log_warning_msg "Not enough free ${free_string} (${freespace}k > ${size}k) to copy live media in ${copytodev}." return 1 fi # begin copying.. mkdir "${copyto}" echo "mount -t ${fstype} ${mount_options} ${dev} ${copyto}" mount -t "${fstype}" ${mount_options} "${dev}" "${copyto}" cp -a ${copyfrom}/* ${copyto} if [ -e ${copyfrom}/.disk ]; then cp -a ${copyfrom}/.disk ${copyto} fi umount ${copyfrom} mount -r -o move ${copyto} ${copyfrom} rmdir ${copyto} return 0 } do_netmount() { rc=1 modprobe "${MP_QUIET}" af_packet # For DHCP udevadm trigger udevadm settle configure_networking export DEVICE if [ "${NFSROOT}" = "auto" ]; then NFSROOT=${ROOTSERVER}:${ROOTPATH} fi [ "$quiet" != "y" ] && log_begin_msg "Trying netboot from ${NFSROOT}" if [ "${NETBOOT}" != "nfs" ] && do_cifsmount ; then rc=0 elif do_nfsmount ; then NETBOOT="nfs" export NETBOOT rc=0 fi [ "$quiet" != "y" ] && log_end_msg return ${rc} } do_nfsmount() { rc=1 modprobe "${MP_QUIET}" nfs if [ -z "${NFSOPTS}" ]; then NFSOPTS="" else NFSOPTS=",${NFSOPTS}" fi [ "$quiet" != "y" ] && log_begin_msg "Trying nfsmount -o nolock -o ro ${NFSOPTS} ${NFSROOT} ${mountpoint}" # FIXME: This while loop is an ugly HACK round an nfs bug i=0 while [ "$i" -lt 60 ]; do nfsmount -o nolock -o ro${NFSOPTS} "${NFSROOT}" "${mountpoint}" && rc=0 && break sleep 1 i="$(($i + 1))" done return ${rc} } do_cifsmount() { rc=1 if [ -x "/sbin/mount.cifs" ]; then if [ -z "${NFSOPTS}" ]; then CIFSOPTS="-ouser=root,password=" else CIFSOPTS="${NFSOPTS}" fi [ "$quiet" != "y" ] && log_begin_msg "Trying mount.cifs ${NFSROOT} ${mountpoint} ${CIFSOPTS}" modprobe "${MP_QUIET}" cifs if mount.cifs "${NFSROOT}" "${mountpoint}" "${CIFSOPTS}" ; then rc=0 fi fi return ${rc} } do_snap_copy () { fromdev="${1}" todir="${2}" snap_type="${3}" size=$(fs_size "${fromdev}" "" "used") if [ -b "${fromdev}" ]; then # look for free mem if [ -n "${HOMEMOUNTED}" -a "${snap_type}" = "HOME" ]; then todev=$(cat /proc/mounts | grep -s " $(base_path ${todir}) " | awk '{print $1}' ) freespace=$(df -k | grep -s ${todev} | awk '{print $4}') else freespace=$(awk '/^MemFree:/{f=$2} /^Cached:/{c=$2} END{print f+c}' /proc/meminfo) fi tomount="/mnt/tmpsnap" if [ ! -d "${tomount}" ] ; then mkdir -p "${tomount}" fi fstype=$(get_fstype "${fromdev}") if [ -n "${fstype}" ]; then # Copying stuff... mount -t "${fstype}" -o ro,noatime "${fromdev}" "${tomount}" cp -a "${tomount}"/* ${todir} umount "${tomount}" else log_warning_msg "Unrecognized fstype: ${fstype} on ${fromdev}:${snap_type}" fi rmdir "${tomount}" if echo ${fromdev} | grep -qs loop; then losetup -d "${fromdev}" fi return 0 else return 1 [ "$quiet" != "y" ] && log_warning_msg "Unable to find the snapshot ${snap_type} medium" fi } try_snap () { # Look for $snap_label.* in block devices and copy the contents to $snap_mount # and remember the device and filename for resync on exit in casper.init snap_label="${1}" snap_mount="${2}" snap_type="${3}" snapdata=$(find_files "${snap_label}.squashfs ${snap_label}.cpio.gz ${snap_label}.ext2") if [ ! -z "${snapdata}" ]; then snapdev="$(echo ${snapdata} | cut -f1 -d ' ')" snapback="$(echo ${snapdata} | cut -f2 -d ' ')" snapfile="$(echo ${snapdata} | cut -f3 -d ' ')" if echo "${snapfile}" | grep -qs '\(squashfs\|ext2\)'; then # squashfs or ext2 snapshot dev=$(get_backing_device "${snapback}/${snapfile}") if ! do_snap_copy "${dev}" "${snap_mount}" "${snap_type}"; then log_warning_msg "Impossible to include the ${snapfile} Snapshot" return 1 fi else # cpio.gz snapshot # Unfortunately klibc's cpio is incompatible with the rest of # the world; everything else requires -u -d, while klibc doesn't # implement them. Try to detect whether it's in use. cpiopath="$(which cpio)" || true if [ "$cpiopath" ] && grep -aq /lib/klibc "$cpiopath"; then cpioargs= else cpioargs='-u -d' fi if ! (cd "${snap_mount}" && zcat "${snapback}/${snapfile}" | cpio -i $cpioargs 2>/dev/null) ; then log_warning_msg "Impossible to include the ${snapfile} Snapshot" return 1 fi fi umount "${snapback}" else dev=$(find_cow_device "${snap_label}") if [ -b "${dev}" ]; then if echo "${dev}" | grep -qs loop; then # strange things happens, user confused? snaploop=$( losetup ${dev} | awk '{print $3}' | tr -d '()' ) snapfile=$(basename ${snaploop}) snapdev=$(cat /proc/mounts | awk '{print $2,$1}' | grep -es "^$( dirname ${snaploop} )" | cut -f2 -d ' ') else snapdev="${dev}" fi if ! do_snap_copy "${dev}" "${snap_mount}" "${snap_type}" ; then log_warning_msg "Impossible to include the ${snap_label} Snapshot" return 1 else if [ -n "${snapfile}" ]; then # it was a loop device, user confused umount ${snapdev} fi fi else log_warning_msg "Impossible to include the ${snap_label} Snapshot" return 1 fi fi echo "export ${snap_type}SNAP="/cow${snap_mount#$rootmnt}":${snapdev}:${snapfile}" >> /etc/casper.conf # for resync on reboot/halt return 0 } setup_unionfs() { image_directory="$1" rootmnt="$2" if [ "${UNIONFS}" = 'DEFAULT' ]; then for union in 'overlayfs' 'aufs' 'unionfs' do modprobe "${MP_QUIET}" -b ${union} || true if cut -f2 /proc/filesystems | grep -q "^${union}\$"; then UNIONFS="${union}" break fi done fi if [ "${UNIONFS}" = 'DEFAULT' -a -x /bin/unionfs-fuse ]; then UNIONFS="unionfs-fuse" fi # If all else fails fall back to aufs. if [ "${UNIONFS}" = 'DEFAULT' ]; then UNIONFS='aufs' fi # run-init can't deal with images in a subdir, but we're going to # move all of these away before it runs anyway. No, we're not, # put them in / since move-mounting them into / breaks mono and # some other apps. croot="/" # Let's just mount the read-only file systems first rofsstring="" rofslist="" if [ "${UNIONFS}" = "aufs" ]; then roopt="rr" elif [ "${UNIONFS}" = "unionfs-fuse" ]; then roopt="RO" else roopt="ro" fi mkdir -p "${croot}" for image_type in "ext2" "squashfs" "dir" ; do for image in "${image_directory}"/*."${image_type}"; do imagename=$(basename "${image}") # Skip Edubuntu's extra squashfs if [ "$imagename" = "ltsp.squashfs" ] || [ "$imagename" = "server.squashfs" ]; then continue fi if [ -d "${image}" ]; then # it is a plain directory: do nothing rofsstring="${image}=${roopt}:${rofsstring}" rofslist="${image} ${rofslist}" elif [ -f "${image}" ]; then backdev=$(get_backing_device "$image") fstype=$(get_fstype "${backdev}") if [ "${fstype}" = "unknown" ]; then panic "Unknown file system type on ${backdev} (${image})" fi mkdir -p "${croot}/${imagename}" mount -t "${fstype}" -o ro,noatime "${backdev}" "${croot}/${imagename}" || panic "Can not mount $backdev ($image) on ${croot}/${imagename}" && rofsstring="${croot}/${imagename}=${roopt}:${rofsstring}" && rofslist="${croot}/${imagename} ${rofslist}" fi done done rofsstring=${rofsstring%:} mkdir -p /cow cowdevice="tmpfs" cow_fstype="tmpfs" cow_mountopt="rw,noatime,mode=755" # Looking for "${root_persistence}" device or file if [ -n "${PERSISTENT}" ]; then cowprobe=$(find_cow_device "${root_persistence}") if [ -b "${cowprobe}" ]; then cowdevice=${cowprobe} cow_fstype=$(get_fstype "${cowprobe}") cow_mountopt="rw,noatime" else [ "$quiet" != "y" ] && log_warning_msg "Unable to find the persistent medium" fi fi mount -t ${cow_fstype} -o ${cow_mountopt} ${cowdevice} /cow || panic "Can not mount $cowdevice on /cow" case ${UNIONFS} in unionfs-fuse) (ulimit -n 16384; unionfs-fuse -o cow -o noinitgroups -o default_permissions -o allow_other -o use_ino -o suid /cow=RW:$rofsstring "$rootmnt" || panic "${UNIONFS} mount failed") mkdir -p /dev/.initramfs/varrun pidof unionfs-fuse >> /dev/.initramfs/varrun/sendsigs.omit || true ;; aufs|unionfs) mount -t ${UNIONFS} -o noatime,dirs=/cow=rw:$rofsstring ${UNIONFS} "$rootmnt" || panic "${UNIONFS} mount failed" ;; overlayfs) # Mount the layers pairwise from the bottom onto rootmnt, # for the second and later layers rootmnt forms the lower layer. mounts="" for mount in /cow $rofslist do mounts="$mount $mounts" done lower="" for mount in $mounts do if [ "$lower" = "" ]; then lower="$mount" continue fi mount -t overlayfs -o "upperdir=$mount,lowerdir=$lower" \ "$mount" "$rootmnt" lower="$rootmnt" done ;; esac # Adding other custom mounts if [ -n "${PERSISTENT}" ]; then # directly mount /home # FIXME: add a custom mounts configurable system homecow=$(find_cow_device "${home_persistence}" ) if [ -b "${homecow}" ]; then mount -t $(get_fstype "${homecow}") -o rw,noatime "${homecow}" "${rootmnt}/home" export HOMEMOUNTED=1 # used to proper calculate free space in do_snap_copy() else [ "$quiet" != "y" ] && log_warning_msg "Unable to find the persistent home medium" fi # Look for other snapshots to copy in try_snap "${root_snapshot_label}" "${rootmnt}" "ROOT" try_snap "${home_snapshot_label}" "${rootmnt}/home" "HOME" fi if [ -n "${SHOWMOUNTS}" ]; then for d in ${rofslist}; do mkdir -p "${rootmnt}/${LIVE_MEDIA_PATH}/${d##*/}" case d in *.dir) # do nothing # mount -o bind "${d}" "${rootmnt}/${LIVE_MEDIA_PATH}/${d##*/}" ;; *) if [ "${UNIONFS}" = unionfs-fuse ]; then mount -o bind "${d}" "${rootmnt}/${LIVE_MEDIA_PATH}/${d##*/}" else mount -o move "${d}" "${rootmnt}/${LIVE_MEDIA_PATH}/${d##*/}" fi ;; esac done # shows cow fs on /cow for use by casper-snapshot mkdir -p "${rootmnt}/cow" mount -o bind /cow "${rootmnt}/cow" fi # move the first mount; no head in busybox-initramfs for d in $(mount -t squashfs | cut -d\ -f 3); do mkdir -p "${rootmnt}/rofs" if [ "${UNIONFS}" = unionfs-fuse ]; then mount -o bind "${d}" "${rootmnt}/rofs" else mount -o move "${d}" "${rootmnt}/rofs" fi break done } check_dev () { sysdev="${1}" devname="${2}" skip_uuid_check="${3}" if [ -z "${devname}" ]; then devname=$(sys2dev "${sysdev}") fi if [ -d "${devname}" ]; then mount -o bind "${devname}" $mountpoint || continue if is_casper_path $mountpoint; then echo $mountpoint return 0 else umount $mountpoint fi fi [ -e "$devname" ] || continue if [ -n "${LIVEMEDIA_OFFSET}" ]; then loopdevname=$(setup_loop "${devname}" "loop" "/sys/block/loop*" "${LIVEMEDIA_OFFSET}") devname="${loopdevname}" fi fstype=$(get_fstype "${devname}") if is_supported_fs ${fstype}; then devuid=$(blkid -o value -s UUID "$devname") [ -n "$devuid" ] && grep -qs "\<$devuid\>" $tried && continue mount -t ${fstype} -o ro,noatime "${devname}" $mountpoint || continue [ -n "$devuid" ] && echo "$devuid" >> $tried if is_casper_path $mountpoint && \ ([ "$skip_uuid_check" ] || [ "$UUID" = "$devuid" ] || matches_uuid $mountpoint); then echo $mountpoint return 0 else umount $mountpoint fi fi if [ -n "${LIVEMEDIA_OFFSET}" ]; then losetup -d "${loopdevname}" fi return 1 } is_mapper() { dev="$1" # we don't consider control a mapper device echo "$dev" |grep "/dev/mapper/control" >/dev/null && return 1 echo "$dev" |grep "/dev/mapper/.\+" >/dev/null && return 0 return 1 } is_md() { dev="$1" echo "$dev" |grep "/dev/md[0-9]" >/dev/null && return 0 return 1 } find_livefs() { timeout="${1}" # first look at the one specified in the command line if [ ! -z "${LIVEMEDIA}" ]; then if check_dev "null" "${LIVEMEDIA}" "skip_uuid_check"; then return 0 fi fi # don't start autodetection before timeout has expired if [ -n "${LIVEMEDIA_TIMEOUT}" ]; then if [ "${timeout}" -lt "${LIVEMEDIA_TIMEOUT}" ]; then return 1 fi fi # or do the scan of block devices for sysblock in $(echo /sys/block/* | tr ' ' '\n' | egrep -v "/(loop|ram|fd|md)"); do devname=$(sys2dev "${sysblock}") [ -e "$devname" ] || continue fstype=$(get_fstype "${devname}") if /lib/udev/cdrom_id ${devname} > /dev/null; then if check_dev "null" "${devname}" ; then return 0 fi elif is_nice_device "${sysblock}" ; then for dev in $(subdevices "${sysblock}"); do if check_dev "${dev}" ; then return 0 fi done elif is_md "${devname}" || is_mapper "${devname}" ; then if check_dev "null" "${devname}" ; then return 0 fi elif [ "${fstype}" = "squashfs" -o \ "${fstype}" = "ext4" -o \ "${fstype}" = "ext3" -o \ "${fstype}" = "ext2" -o \ "${fstype}" = "btrfs" ]; then # This is an ugly hack situation, the block device has # an image directly on it. It's hopefully # casper, so take it and run with it. ln -s "${devname}" "${devname}.${fstype}" echo "${devname}.${fstype}" return 0 fi done return 1 } mountroot() { exec 6>&1 exec 7>&2 exec > casper.log exec 2>&1 tail -f casper.log >&7 & tailpid="$!" parse_cmdline [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/casper-premount" run_scripts /scripts/casper-premount [ "$quiet" != "y" ] && log_end_msg if [ ! -z "${NETBOOT}" ]; then if do_netmount ; then livefs_root="${mountpoint}" else panic "Unable to find a live file system on the network" fi else # Scan local devices for the image i=0 while [ "$i" -lt 60 ]; do livefs_root=$(find_livefs $i) if [ "${livefs_root}" ]; then break fi sleep 1 i="$(($i + 1))" done fi if [ -z "${livefs_root}" ]; then panic "Unable to find a medium containing a live file system" fi if [ "${TORAM}" ]; then live_dest="ram" elif [ "${TODISK}" ]; then live_dest="${TODISK}" fi if [ "${live_dest}" ]; then log_begin_msg "Copying live_media to ${live_dest}" copy_live_to "${livefs_root}" "${live_dest}" log_end_msg fi mount_images_in_directory "${livefs_root}" "${rootmnt}" log_end_msg # Allow to override USERNAME and HOST based on media information # make it skipable by setting FLAVOUR= in casper.conf if [ -f /cdrom/.disk/info ] && [ -z "$FLAVOUR" ]; then FLAVOUR="$(cut -d' ' -f1 "/cdrom/.disk/info" 2>/dev/null | tr '[A-Z]' '[a-z]')" || FLAVOUR= if [ -n "$FLAVOUR" ]; then HOST=$FLAVOUR USERNAME=$FLAVOUR export HOST USERNAME sed -i "s,USERNAME=.*,USERNAME=\"$FLAVOUR\",g; s,HOST=.*,HOST=\"$FLAVOUR\",g" /etc/casper.conf fi fi # Apply command lines override of HOST, USERNAME and USERFULLNAME [ -n "$CMD_HOST" ] && HOST=$CMD_HOST && export HOST [ -n "$CMD_USERNAME" ] && USERNAME=$CMD_USERNAME && export USERNAME [ -n "$CMD_USERFULLNAME" ] && USERFULLNAME=$CMD_USERFULLNAME && export USERFULLNAME if [ -n "$CMD_HOST" ] || [ -n "$CMD_USERNAME" ] || [ -n "$CMD_USERFULLNAME" ]; then sed -i "s,USERNAME=.*,USERNAME=\"$USERNAME\",g; s,USERFULLNAME=.*,USERFULLNAME=\"$USERFULLNAME\",g; s,HOST=.*,HOST=\"$HOST\",g" /etc/casper.conf fi # unionfs-fuse needs /dev to be bind-mounted for the duration of # casper-bottom; udev's init script will take care of things after that if [ "${UNIONFS}" = unionfs-fuse ]; then mount -n -o bind /dev "${rootmnt}/dev" fi # Open up two fifo's fd's for debconf-communicate to use. Speeds up # the Casper process considerably. log_begin_msg "Creating debconf-communicate fifo mechanism" mkfifo /tmp/debconf-in.fifo mkfifo /tmp/debconf-out.fifo # Make the template database read-only, so that passthrough debconf # instances can write to it directly; otherwise templates are only # passed through when necessary. Use temporary config databases as # well; we'll copy their contents back at the end. DEBCONF_TMPDIR="$(chroot /root mktemp -dt debconf.XXXXXX)" cp -a /root/var/cache/debconf/config.dat "/root$DEBCONF_TMPDIR/" cp -a /root/var/cache/debconf/passwords.dat "/root$DEBCONF_TMPDIR/" sed "s,^Filename: /var/cache/debconf/\(config\|passwords\).dat$,Filename: $DEBCONF_TMPDIR/\1.dat,; /^Name: templatedb/a\ Readonly: true" /root/etc/debconf.conf >"/root$DEBCONF_TMPDIR/debconf.conf" DEBCONF_SYSTEMRC="$DEBCONF_TMPDIR/debconf.conf" chroot /root debconf-communicate -fnoninteractive casper > /tmp/debconf-out.fifo < /tmp/debconf-in.fifo & debconfpid="$!" if [ ! -p /tmp/debconf-in.fifo ] || [ ! -p /tmp/debconf-out.fifo ]; then log_warning_msg "failed to setup debconf-communicate channel" fi log_end_msg # Order matters! # These file descriptors must stay open until we're finished with # debconf-communicate. exec 4/tmp/debconf-in.fifo maybe_break casper-bottom [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/casper-bottom" run_scripts /scripts/casper-bottom [ "$quiet" != "y" ] && log_end_msg if [ "${UNIONFS}" = unionfs-fuse ]; then umount "${rootmnt}/dev" fi # Close the fd's associated with debconf-communicate. exec 3>&- 4<&- rm -f /tmp/debconf-in.fifo rm -f /tmp/debconf-out.fifo wait $debconfpid # Copy config database changes back to the master files. chroot /root debconf-copydb tmpdb config \ --config=Name:tmpdb --config=Driver:File \ --config="Filename:$DEBCONF_TMPDIR/config.dat" chroot /root debconf-copydb tmpdb passwords \ --config=Name:tmpdb --config=Driver:File \ --config="Filename:$DEBCONF_TMPDIR/passwords.dat" rm -rf "$DEBCONF_TMPDIR" exec 1>&6 6>&- exec 2>&7 7>&- kill "$tailpid" cp casper.log "${rootmnt}/var/log/" if [ -f /etc/casper.conf ]; then cp /etc/casper.conf "${rootmnt}/etc/" fi } casper/scripts/casper-functions0000664000000000000000000000231712321311227014115 0ustar . /scripts/functions # Print a message and wait for enter log_wait_msg() { if [ -x /bin/plymouth ] && plymouth --ping; then plymouth message --text="$@" plymouth watch-keystroke | read nunya fi _log_msg "Waiting: $@ ..." } lang2locale() { langpart="${1%%_*}" if [ "$1" != "C" ]; then # Match the language code with 1st field in languagelist line=$(grep -v "^#" /root/usr/share/localechooser/languagelist | cut -f1,3,5 -d\; | grep -v ';C$' | grep "^$langpart[_;]") if [ -n "$line" ]; then if [ "$(echo "$line" | grep -c '')" -gt 1 ]; then # More than one match; try matching the # country as well. countrypart="${1#*_}" if [ "$countrypart" = "$1" ]; then countryline="$(echo "$line" | head -n1)" echo "${countryline##*;}" return fi countrypart="${countrypart%%[@.]*}" countryline="$(echo "$line" | grep ";$countrypart;" | head -n1 || true)" if [ "$countryline" ]; then echo "${countryline##*;}" return fi fi echo "${line##*;}" fi else echo "C" fi } load_confmodule() { # Only do this once. if [ -z "$DEBCONF_REDIR" ]; then exec <&4 export DEBIAN_HAS_FRONTEND=1 export DEBCONF_REDIR=1 fi . /root/usr/share/debconf/confmodule } casper/scripts/casper-premount/0000775000000000000000000000000012321311227014030 5ustar casper/scripts/casper-premount/10driver_updates0000775000000000000000000000614212321311227017142 0ustar #!/bin/sh PREREQ="" prereqs() { echo "$PREREQ" } case $1 in # get pre-requisites prereqs) prereqs exit 0 ;; esac . /scripts/casper-functions . /scripts/casper-helpers mountpoint=/cdrom is_updates_path() { # Driver packages are stored in ubuntu-drivers// # subdirectory. Each package contains a module for a specific # kernel flavour. path=$1 abi="$(uname -r)" kver="$(echo "$abi" | cut -d- -f1,2)" kbase="$(echo "$abi" | cut -d- -f1)" for leaf in "$abi" "$kver" "$kbase"; do update_dir="$path/ubuntu-drivers/$leaf" [ -d "$update_dir" ] || continue if [ "$(echo $update_dir/*_$DPKG_ARCH.deb)" != \ "$update_dir/*_$DPKG_ARCH.deb" ]; then echo "$update_dir" return 0 fi done return 1 } is_nice_device() { sysfs_path="${1#/sys}" if udevadm test-builtin path_id "${sysfs_path}" | egrep -q "ID_PATH=(usb|pci-[^-]*-(ide|scsi|usb))"; then return 0 fi return 1 } check_dev_updates () { sysdev="${1}" devname="${2}" if [ -z "${devname}" ]; then devname=$(sys2dev "${sysdev}") fi fstype=$(get_fstype "${devname}") if is_supported_fs ${fstype}; then mount -t ${fstype} -o ro "${devname}" $mountpoint || continue if is_updates_path $mountpoint; then return 0 else umount $mountpoint fi fi return 1 } find_driver_updates() { for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -v loop | grep -v ram); do devname=$(sys2dev "${sysblock}") fstype=$(get_fstype "${devname}") if /lib/udev/cdrom_id ${devname} > /dev/null; then if check_dev_updates "null" "${devname}" ; then return 0 fi elif is_nice_device "${sysblock}" ; then for dev in $(subdevices "${sysblock}"); do if check_dev_updates "${dev}" ; then return 0 fi done fi done return 1 } updates="false" for x in $(cat /proc/cmdline); do case $x in debian-installer/driver-update=*) updates=${x#debian-installer/driver-update=} ;; esac done if [ "$updates" != "true" ]; then log_end_msg exit 0 fi # Not sure what to do for network installs. I assume there isn't even a CD # for this anyway, so fail. if [ -n "${NETBOOT}" ]; then log_end_msg exit 0; fi #if chroot /root [ -f /etc/gdm/gdm-cdd.conf ]; then # GDMCONF=/etc/gdm/gdm-cdd.conf #else # GDMCONF=/etc/gdm/gdm.conf #fi eject log_wait_msg "Insert a driver CD and press ENTER ($DPKG_ARCH)" log_begin_msg "Looking for driver update CD" for i in 0 1 2 3 4 5 6 7 8 9 a b c d e f 10 11 12 13; do updates_root=$(find_driver_updates) if [ "${updates_root}" ]; then break; fi sleep 1 done log_end_msg if [ -z "${updates_root}" ]; then log_begin_msg "Could not find driver updates" log_wait_msg "Re-insert install CD and press ENTER" exit 0 fi log_begin_msg "Copying driver updates to temporary location" mkdir -p /tmp/driver-updates cp $updates_root/*_$DPKG_ARCH.deb /tmp/driver-updates/ umount $mountpoint eject log_end_msg log_wait_msg "Re-insert install CD and press ENTER." casper/scripts/casper-bottom/0000775000000000000000000000000012321312464013467 5ustar casper/scripts/casper-bottom/26serialtty0000775000000000000000000000110112321311227015572 0ustar #! /bin/sh PREREQ="" DESCRIPTION="Setting up a serial tty..." prereqs() { echo "$PREREQ" } case $1 in # get pre-requisites prereqs) prereqs exit 0 ;; esac . /scripts/casper-functions for x in $(cat /proc/cmdline); do case $x in serialtty=*) tty=${x#serialtty=} log_begin_msg "$DESCRIPTION" cat > /root/etc/init/${tty}.conf <> /root/usr/share/kubuntu-default-settings/kde4-profile/default/share/config/notificationhelper fi casper/scripts/casper-bottom/15autologin0000775000000000000000000000462612321311227015570 0ustar #!/bin/sh PREREQ="" DESCRIPTION="Setting up automatic login..." prereqs() { echo "$PREREQ" } case $1 in # get pre-requisites prereqs) prereqs exit 0 ;; esac . /scripts/casper-functions log_begin_msg "$DESCRIPTION" GDMCustomFile=/root/etc/gdm/custom.conf if [ -f $GDMCustomFile ]; then # Configure GDM autologin sed -i -r \ -e "s/^#[ ]*AutomaticLoginEnable =.*\$/AutomaticLoginEnable=true/" \ -e "s/^#[ ]*AutomaticLogin =.*\$/AutomaticLogin=$USERNAME/" \ -e "s/^#[ ]*TimedLoginEnable =.*\$/TimedLoginEnable=false/" \ $GDMCustomFile fi if [ -f /root/etc/kde4/kdm/kdmrc ]; then # Configure KDM autologin sed -i -r \ -e "s/^#?AutoLoginEnable=.*\$/AutoLoginEnable=true/" \ -e "s/^#?AutoLoginUser=.*\$/AutoLoginUser=$USERNAME/" \ -e "s/^#?AutoReLogin=.*\$/AutoReLogin=true/" \ /root/etc/kde4/kdm/kdmrc fi if [ -f /root/etc/lxdm/lxdm.conf ]; then # Configure LXDM autologin with LXDE session sed -i -r \ -e "s/^# autologin=dgod/autologin=$USERNAME/" \ -e "s/^# session/session/" \ -e "s/startlxde/startlubuntu/" \ /root/etc/lxdm/lxdm.conf fi if [ -f /root/etc/xdg/lubuntu/lxdm/lxdm.conf ]; then # Configure LXDM autologin with Lubuntu session sed -i -r \ -e "s/^# autologin=dgod/autologin=$USERNAME/" \ -e "s/^# session/session/" \ -e "s/startlxde/startlubuntu/" \ /root/etc/xdg/lubuntu/lxdm/lxdm.conf fi if [ -d /root/etc/lightdm ]; then # Configure LightDM autologin LightDMCustomFile=/root/etc/lightdm/lightdm.conf AutologinParameters="allow-guest=false\n\ autologin-guest=false\n\ autologin-user=$USERNAME\n\ autologin-user-timeout=0\n\ autologin-session=lightdm-autologin" # Prevent from updating if parameters already present (persistent usb key) if ! `grep -qs '^autologin-user' $LightDMCustomFile` ; then if ! `grep -qs '\[SeatDefaults\]' $LightDMCustomFile` ; then echo '[SeatDefaults]' >> $LightDMCustomFile fi sed -i "s/\[SeatDefaults\]/\[SeatDefaults\]\n$AutologinParameters/" $LightDMCustomFile fi # LightDM on kubuntu-active wants to start ubuntu.desktop, workaround here for now jriddell 2012-03-15 if [ -e /root/usr/share/xsessions/plasma-active.desktop ]; then cp /root/usr/share/xsessions/plasma-active.desktop /root/usr/share/xsessions/ubuntu.desktop fi fi log_end_msg casper/scripts/casper-bottom/22sslcert0000775000000000000000000000063212321311227015235 0ustar #! /bin/sh PREREQ="" DESCRIPTION="Regenerating SSL certificate..." prereqs() { echo "$PREREQ" } case $1 in # get pre-requisites prereqs) prereqs exit 0 ;; esac . /scripts/casper-functions load_confmodule log_begin_msg "$DESCRIPTION" if [ -x /root/usr/sbin/make-ssl-cert ]; then chroot /root /usr/sbin/make-ssl-cert generate-default-snakeoil --force-overwrite fi log_end_msg casper/scripts/casper-bottom/05mountpoints0000775000000000000000000000072312321311227016157 0ustar #!/bin/sh PREREQ="" DESCRIPTION="Moving mount points..." prereqs() { echo "$PREREQ" } case $1 in # get pre-requisites prereqs) prereqs exit 0 ;; esac . /scripts/casper-functions log_begin_msg "$DESCRIPTION" # Move to the new root filesystem so that programs there can get at it. mkdir -p /root/cdrom mount -n -o move /cdrom /root/cdrom # temporary hack for LP#727783 mkdir -p /root/media ln -s /cdrom /root/media/cdrom log_end_msg casper/scripts/casper-bottom/32disable_hibernation0000775000000000000000000000071712321311227017550 0ustar #!/bin/sh PREREQ="" DESCRIPTION="Configuring power management..." prereqs() { echo "$PREREQ" } case $1 in # get pre-requisites prereqs) prereqs exit 0 ;; esac . /scripts/casper-functions log_begin_msg "$DESCRIPTION" cat < /root/var/lib/polkit-1/localauthority/50-local.d/disable-hibernate.pkla [Disable hibernate in live system] Identity=unix-user:* Action=org.freedesktop.upower.hibernate ResultActive=no EOF log_end_msg casper/scripts/casper-bottom/01integrity_check0000775000000000000000000000045112321311227016725 0ustar #!/bin/sh PREREQ="" prereqs() { echo "$PREREQ" } case $1 in # get pre-requisites prereqs) prereqs exit 0 ;; esac if grep -q integrity-check /proc/cmdline; then casper-md5check /cdrom /cdrom/md5sum.txt < /dev/tty8 > /dev/tty8 reboot while :; do sleep 60; done fi casper/scripts/casper-bottom/25configure_init0000775000000000000000000000371412321311227016571 0ustar #!/bin/sh PREREQ="" DESCRIPTION="Setting up init..." prereqs() { echo "$PREREQ" } case $1 in # get pre-requisites prereqs) prereqs exit 0 ;; esac . /scripts/casper-functions log_begin_msg "$DESCRIPTION" # Arrange for shells on virtual consoles, rather than login prompts if [ -n "$USERNAME" ]; then if [ -f /root/etc/inittab ]; then sed -i -e "s|^\([^:]*:[^:]*:[^:]*\):.*getty.*\<\(tty[0-9]*\).*$|\1:/bin/login -f $USERNAME /dev/\2 2>\&1|" /root/etc/inittab fi if [ "/root/etc/init/tty*" != "$(echo /root/etc/init/tty*)" ]; then for f in /root/etc/init/tty*; do sed -i -e "s|^exec.*|exec /bin/login -f $USERNAME /dev/$(basename $f .conf) 2>\&1|" $f done for x in $(cat /proc/cmdline); do case $x in textonly|automatic-ubiquity|only-ubiquity|noninteractive) rm -f /root/etc/rc?.d/[SK]??[gkx]dm ;; esac done fi # Since we use autologin, lastlog doesn't make sense on the console. sed -i '/^[^#].*pam_lastlog\.so/s/^/# /' /root/etc/pam.d/login fi # This has the nice side effect of the cron.{daily,weekly,monthly} jobs in # /etc/crontab remaining disabled, yet also not run by anacron if [ -x /root/usr/sbin/anacron ]; then chroot /root dpkg-divert --add --rename --quiet /usr/sbin/anacron ln -s /bin/true /root/usr/sbin/anacron fi # No point, really rm -f /root/etc/rc?.d/[SK]??postfix # Avoid clobbering the user's clock rm -f /root/etc/rc?.d/K??hwclock.sh /root/etc/init/hwclock-save.conf # Disable readahead since it doesn't play well with squashfs + unionfs # use chmod instead of mv to not trigger unionfs bugs. if [ -e /root/sbin/readahead-list ]; then chmod -x /root/sbin/readahead-list fi # Disable ureadahead too since we don't ship a pack file for it anyway, so # all we'll end up doing is profiling the live CD boot. ureadahead also # breaks partman occasionally by reading from its synchronisation FIFOs. rm -f /root/etc/init/ureadahead*.conf log_end_msg exit 0 casper/scripts/casper-bottom/41apt_cdrom0000775000000000000000000000121212321311227015522 0ustar #! /bin/sh PREREQ="" DESCRIPTION="Adding APT-CDROM source..." prereqs() { echo "$PREREQ" } case $1 in # get pre-requisites prereqs) prereqs exit 0 ;; esac . /scripts/casper-functions log_begin_msg "$DESCRIPTION" # apt-cdrom would fail otherwise if [ ! -s /root/cdrom/.disk/info ]; then exit 0 fi mount -n -o bind /sys /root/sys mount -n -o bind /proc /root/proc mount -n -o bind /dev /root/dev chroot /root apt-cdrom -o Acquire::cdrom::mount=/cdrom \ -o Dir::Media::MountPath=/cdrom \ -o Acquire::cdrom::AutoDetect=false -m add umount /root/dev umount /root/proc umount /root/sys log_end_msg casper/scripts/casper-bottom/31disable_update_notifier0000775000000000000000000000224412321311227020423 0ustar #!/bin/sh PREREQ="" DESCRIPTION="Disabling update-notifier..." prereqs() { echo "$PREREQ" } case $1 in # get pre-requisites prereqs) prereqs exit 0 ;; esac . /scripts/casper-functions log_begin_msg "$DESCRIPTION" # For GNOME, we divert away apt-check to avoid a regular 'apt-get update' # equivalent in the live session. We want to run update-notifier for crash # report handling. chroot /root dpkg-divert --add --rename --quiet \ /usr/lib/update-notifier/apt-check ln -sf /bin/true /root/usr/lib/update-notifier/apt-check # For KDE, adept_notifier's only useful function at the moment is an # 'apt-get update' equivalent, so we disable it entirely. rm -f /root/usr/share/autostart/adept_notifier_auto.desktop # Upgrading the live CD to new releases is probably not a great plan. chroot /root dpkg-divert --add --rename --quiet \ /usr/lib/ubuntu-release-upgrader/check-new-release ln -sf /bin/true /root/usr/lib/ubuntu-release-upgrader/check-new-release chroot /root dpkg-divert --add --rename --quiet \ /usr/lib/ubuntu-release-upgrader/check-new-release-gtk ln -sf /bin/true /root/usr/lib/ubuntu-release-upgrader/check-new-release-gtk log_end_msg casper/scripts/casper-bottom/50ubiquity-bluetooth-agent0000775000000000000000000000053212321311227020530 0ustar #!/bin/sh if [ -f /root/usr/bin/ubiquity-bluetooth-agent ] && [ -f /root/usr/bin/bluetooth-applet ] && [ ! -L /root/usr/bin/bluetooth-applet ]; then chroot /root dpkg-divert --package casper --divert /usr/bin/bluetooth-applet.orig --rename /usr/bin/bluetooth-applet ln -s ubiquity-bluetooth-agent /root/usr/bin/bluetooth-applet fi casper/scripts/casper-bottom/34disable_kde_services0000775000000000000000000000164012321311227017712 0ustar #! /bin/sh PREREQ="" DESCRIPTION="Disabling unnecessary KDE services..." prereqs() { echo "$PREREQ" } case $1 in # get pre-requisites prereqs) prereqs exit 0 ;; esac . /scripts/casper-functions log_begin_msg "$DESCRIPTION" rm -f /root/usr/share/autostart/kab2kabc.desktop rm -f /root/usr/share/autostart/kaddressbookmigrator.desktop rm -f /root/usr/share/autostart/korgac.desktop rm -f /root/usr/share/autostart/printer-applet.desktop rm -f /root/usr/share/autostart/nepomukserver.desktop rm -f /root/usr/share/kde4/services/kwalletd.desktop rm -f /root/usr/share/kde4/services/kded/kpackagekitd.desktop if [ -z "${PERSISTENT}" ]; then rm -f /root/usr/share/kde4/services/kded/freespacenotifier.desktop fi rm -f /root/usr/share/kde4/services/plasma-runner-contacts.desktop # starts akonadi rm -f /root/usr/share/kde4/services/plasma-dataengine-calendar.desktop # starts akonadi log_end_msg casper/scripts/casper-bottom/20xconfig0000775000000000000000000000104212321311227015205 0ustar #!/bin/sh PREREQ="" prereqs() { echo "$PREREQ" } case $1 in # get pre-requisites prereqs) prereqs exit 0 ;; esac . /scripts/casper-functions if grep -q xforcevesa /proc/cmdline 2>&1 >/dev/null; then cat > /root/etc/X11/xorg.conf << EOF Section "Device" Identifier "Configured Video Device" Driver "vesa" EndSection Section "Monitor" Identifier "Configured Monitor" EndSection Section "Screen" Identifier "Default Screen" Monitor "Configured Monitor" Device "Configured Video Device" EndSection EOF fi casper/scripts/casper-bottom/18hostname0000775000000000000000000000110112321311227015371 0ustar #! /bin/sh PREREQ="" DESCRIPTION="Setting hostname..." prereqs() { echo "$PREREQ" } case $1 in # get pre-requisites prereqs) prereqs exit 0 ;; esac . /scripts/casper-functions log_begin_msg "$DESCRIPTION" echo "$HOST" > /root/etc/hostname cat > /root/etc/hosts < /root/var/lib/polkit-1/localauthority/10-vendor.d/10-live-cd.pkla # Policy to allow the livecd user to bypass policykit [Live CD user permissions] Identity=unix-user:$USERNAME;unix-user:lightdm Action=* ResultAny=no ResultInactive=yes ResultActive=yes EOF log_end_msg casper/scripts/casper-bottom/19keyboard0000775000000000000000000002162212321311227015366 0ustar #!/bin/sh PREREQ="" DESCRIPTION="Setting up console keyboard..." prereqs() { echo "$PREREQ" } case $1 in # get pre-requisites prereqs) prereqs exit 0 ;; esac . /scripts/casper-functions log_begin_msg "$DESCRIPTION" kbd=us cslayout= csvariant= csmodel= for x in $(cat /proc/cmdline); do case $x in kbd-chooser/method=*) kbd=${x#kbd-chooser/method=} ;; console-setup/layoutcode=*) cslayout=${x#console-setup/layoutcode=} ;; console-setup/layoutcode\?=*) cslayout=${x#console-setup/layoutcode\?=} ;; console-setup/variantcode=*) csvariant=${x#console-setup/variantcode=} ;; console-setup/variantcode\?=*) csvariant=${x#console-setup/variantcode\?=} ;; console-setup/modelcode=*) csmodel=${x#console-setup/modelcode=} ;; console-setup/modelcode\?=*) csmodel=${x#console-setup/modelcode\?=} ;; keyboard-configuration/layoutcode=*) cslayout=${x#keyboard-configuration/layoutcode=} ;; keyboard-configuration/layoutcode\?=*) cslayout=${x#keyboard-configuration/layoutcode\?=} ;; keyboard-configuration/variantcode=*) csvariant=${x#keyboard-configuration/variantcode=} ;; keyboard-configuration/variantcode\?=*) csvariant=${x#keyboard-configuration/variantcode\?=} ;; keyboard-configuration/modelcode=*) csmodel=${x#keyboard-configuration/modelcode=} ;; keyboard-configuration/modelcode\?=*) csmodel=${x#keyboard-configuration/modelcode\?=} ;; esac done # TODO: This is a horrible clone-and-hack from console-setup. We should # definitely be calling console-setup instead; however, that's too risky for # 8.04 since it will need careful installer testing and will probably be # slower. adjust_console_setup () { if [ -z "$csmodel" ]; then if [ "$cslayout" = br ]; then csmodel=abnt2 elif [ "$cslayout" = jp ]; then csmodel=jp106 fi fi latin= case $cslayout in jp) case $csvariant in ''|106|common|OADG109A|nicola_f_bs) latin=yes ;; *) latin=no cslayout=jp,jp csvariant="106,$csvariant" ;; esac ;; lt) latin=no cslayout=lt,lt case $csvariant in us) csvariant=us, ;; *) csvariant="$csvariant,us" ;; esac ;; me) case $csvariant in ''|basic|latin*) latin=yes ;; cyrillicyz) latin=no cslayout=me,me csvariant="latinyz,$csvariant" ;; cyrillicalternatequotes) latin=no cslayout=me,me csvariant="latinalternatequotes,$csvariant" ;; *) latin=no cslayout=me,me csvariant="basic,$csvariant" ;; esac ;; rs) case $csvariant in ''|basic|latin*) latin=yes ;; yz) latin=no cslayout=rs,rs csvariant="latinyz,$csvariant" ;; alternatequotes) latin=no cslayout=rs,rs csvariant="latinalternatequotes,$csvariant" ;; *) latin=no cslayout=rs,rs csvariant="latin,$csvariant" ;; esac ;; am|ara|ben|bd|bg|bt|by|deva|ge|gh|gr|guj|guru|il|in|ir|iku|kan|kh|la|lao|lk|mk|mm|mn|mv|mal|ori|pk|ru|scc|sy|syr|tel|th|tj|tam|ua|uz) latin=no cslayout="us,$cslayout" csvariant=",$csvariant" ;; *) latin=yes esac if [ "$latin" = no ]; then csoptions="${csoptions:+$csoptions,}grp:alt_shift_toggle" fi if [ "$cslayout" != us ] || [ "$csvariant" ]; then csoptions="${csoptions:+$csoptions,}lv3:ralt_switch" fi } PREFIX= CONFIGFILE= if [ -f /root/etc/default/keyboard ]; then PREFIX=keyboard-configuration CONFIGFILE=/etc/default/keyboard elif [ -f /root/etc/default/console-setup ]; then PREFIX=console-setup CONFIGFILE=/etc/default/console-setup fi # Make a temporary copy of the current file for later diff cp /root$CONFIGFILE /tmp/keyboard.orig # Reset the config for persistent medias if [ -f /cow$CONFIGFILE ]; then echo "Resetting $CONFIGFILE" cp /root/rofs$CONFIGFILE /root$CONFIGFILE fi if [ -x /root/bin/setupcon ] && [ "$PREFIX" ] && [ "$CONFIGFILE" ]; then if [ "$cslayout" ]; then csoptions= adjust_console_setup chroot /root sed -i "s/^XKBLAYOUT=.*/XKBLAYOUT=\"$cslayout\"/" \ "$CONFIGFILE" if [ "$csvariant" ]; then chroot /root sed -i "s/^XKBVARIANT=.*/XKBVARIANT=\"$csvariant\"/" \ "$CONFIGFILE" else casper-preseed /root "$PREFIX/variantcode" '' false fi if [ "$csmodel" ]; then chroot /root sed -i "s/^XKBMODEL=.*/XKBMODEL=\"$csmodel\"/" \ "$CONFIGFILE" else casper-preseed /root "$PREFIX/modelcode" '' false fi if [ "$csoptions" ]; then chroot /root sed -i "s/^XKBOPTIONS=.*/XKBOPTIONS=\"$csoptions\"/" \ "$CONFIGFILE" fi else casper-preseed /root "$PREFIX/layoutcode" '' false casper-preseed /root "$PREFIX/variantcode" '' false casper-preseed /root "$PREFIX/modelcode" '' false fi casper-preseed /root "$PREFIX/optionscode" '' false # prefix remains console-setup even with keyboard-configuration casper-preseed /root console-setup/codesetcode '' false else chroot /root /usr/sbin/install-keymap $kbd casper-preseed /root debian-installer/keymap "$kbd" fi if [ "$(cat /root$CONFIGFILE)" != "$(cat /tmp/keyboard.orig)" ]; then # The keyboard settings have changed, gsettings needs to be flushed if [ -f /root/home/$USERNAME/.config/dconf/user ]; then chroot /root sudo -u $USERNAME dbus-launch --exit-with-session gsettings reset-recursively org.gnome.libgnomekbd.keyboard mount -n -o bind /proc /root/proc chroot /root killall dbus-launch umount /root/proc fi fi log_end_msg casper/scripts/casper-bottom/43disable_updateinitramfs0000775000000000000000000000174512321311227020451 0ustar #!/bin/sh # Fix for LP#150188 PREREQ="" DESCRIPTION="Possibly disabling update-initramfs (useless on a live CD)..." prereqs() { echo "$PREREQ" } case $1 in # get pre-requisites prereqs) prereqs exit 0 ;; esac . /scripts/casper-functions log_begin_msg "$DESCRIPTION" chroot /root dpkg-divert --add --rename --quiet \ /usr/sbin/update-initramfs # Running off a USB disk or other writable media. if [ ! -e /root/usr/sbin/update-initramfs ] && \ [ ! -L /root/usr/sbin/update-initramfs ]; then if [ -w /root/cdrom ] && \ # rw is guaranteed to be first. grep -q ' /root/cdrom rw[, ]' /proc/self/mountinfo; then ln -s /usr/share/casper/casper-update-initramfs \ /root/usr/sbin/update-initramfs else cat > /root/usr/sbin/update-initramfs < $FSTAB </dev/null | /bin/dd bs=10 count=1 2>/dev/null) || continue if [ "$magic" = "SWAPSPACE2" -o "$magic" = "SWAP-SPACE" ]; then # log "Found $device" devices="$devices $device" fi done for device in $devices; do cat >> $FSTAB < "$IFFILE" <> "$IFFILE" <> "$IFFILE" < $resolv <> $resolv [ -n "$rc_domain" ] && echo "domain ${rc_domain}" >> $resolv [ -n "$rc_server0" ] && [ "$rc_server0" != "0.0.0.0" ] && echo "nameserver $rc_server0" >> $resolv [ -n "$rc_server1" ] && [ "$rc_server1" != "0.0.0.0" ] && echo "nameserver $rc_server1" >> $resolv cat $resolv >> /root/var/log/netboot.config fi fi fi if [ ! -x /root/usr/sbin/NetworkManager ]; then for device in /sys/class/net/*/device; do name=$(basename ${device%*/device}) grep -q "iface $name" $IFFILE && continue cat >> "$IFFILE" < /root/etc/default/locale printf '%s UTF-8\n' "${LANG}" > /root/etc/locale.gen chroot /root /usr/sbin/locale-gen "${LANG}" fi log_end_msg casper/scripts/casper-bottom/25adduser0000775000000000000000000001035112321311227015207 0ustar #!/bin/sh PREREQ="" DESCRIPTION="Adding live session user..." prereqs() { echo "$PREREQ" } case $1 in # get pre-requisites prereqs) prereqs exit 0 ;; esac . /scripts/casper-functions load_confmodule log_begin_msg "$DESCRIPTION" debconf_backup () { local question backup for question; do backup="$question-casper-backup" db_register debian-installer/dummy "$backup" db_get "$question" db_set "$backup" "$RET" db_fget "$question" seen db_fset "$backup" seen "$RET" done } debconf_restore () { local question backup for question; do backup="$question-casper-backup" db_get "$backup" db_set "$question" "$RET" db_fget "$backup" seen db_fset "$question" seen "$RET" db_unregister "$backup" done } debconf_backup \ passwd/root-password-crypted \ passwd/root-password passwd/root-password-again \ passwd/user-password-crypted \ passwd/user-password passwd/user-password-again \ passwd/user-fullname passwd/username passwd/user-uid # U6aMy0wojraho is just a blank password db_set passwd/root-password-crypted '*' db_set passwd/user-password-crypted U6aMy0wojraho db_set passwd/user-fullname "$USERFULLNAME" db_set passwd/username "$USERNAME" db_set passwd/user-uid 999 chroot /root /usr/lib/user-setup/user-setup-apply > /dev/null # Clear out debconf database again to avoid confusing ubiquity later. debconf_restore \ passwd/root-password-crypted \ passwd/root-password passwd/root-password-again \ passwd/user-password-crypted \ passwd/user-password passwd/user-password-again \ passwd/user-fullname passwd/username passwd/user-uid if [ -d /root/etc/sudoers.d/ ]; then echo "${USERNAME} ALL=(ALL) NOPASSWD: ALL" > /root/etc/sudoers.d/casper fi LTS="$(cut -d' ' -f3 /root/cdrom/.disk/info 2>/dev/null)" || LTS= RELEASE="$(cut -d' ' -f1-2 /root/cdrom/.disk/info 2>/dev/null | sed 's/-/ /')" || RELEASE= if [ "$LTS" = "LTS" ] && [ -n "$RELEASE" ]; then RELEASE="$RELEASE LTS" fi for file in /usr/share/applications/ubiquity.desktop /usr/share/applications/kde4/ubiquity-kdeui.desktop; do if [ -f "/root/$file" ]; then sed -i "s/RELEASE/$RELEASE/" "/root$file" chroot /root install -d -o $USERNAME -g $USERNAME /home/$USERNAME/Desktop chroot /root install -D -o $USERNAME -g $USERNAME $file /home/$USERNAME/Desktop/$(basename "$file") break fi done if [ -L /root/home/$USERNAME/Examples ]; then chroot /root install -o $USERNAME -g $USERNAME -d /home/$USERNAME/Desktop/ mv /root/home/$USERNAME/Examples /root/home/$USERNAME/Desktop/ fi if [ -f /root/home/$USERNAME/examples.desktop ]; then chroot /root install -o $USERNAME -g $USERNAME -d /home/$USERNAME/Desktop/ mv /root/home/$USERNAME/examples.desktop /root/home/$USERNAME/Desktop/ fi #GDM if [ -d /root/etc/gdm ]; then sed -i '/^[UG]ID_MIN/s/\<1000$/ 999/' /root/etc/login.defs fi # Kubuntu if [ -f "/root/usr/bin/plasma-desktop" ]; then if [ -f "/root/usr/share/kde4/apps/khelpcenter/plugins/kubuntu/a_welcome.desktop" ]; then chroot /root install -d -o $USERNAME -g $USERNAME /home/$USERNAME/Desktop chroot /root install -D -o $USERNAME -g $USERNAME /usr/share/kde4/apps/khelpcenter/plugins/kubuntu/a_welcome.desktop /home/$USERNAME/Desktop/a_welcome.desktop fi fi # Kubuntu Netbook if [ -f "/root/usr/bin/plasma-netbook" ]; then config="/root/usr/share/kubuntu-netbook-default-settings/share/apps/plasma/layout-templates/org.kde.plasma-netbook.defaultSal/contents/layout.js" escaped_desktop="\/usr\/share\/applications\/kde4\/ubiquity-kdeui.desktop" if [ -f $config ]; then sed -i "s/\/\/__UBIQUITY_PLACEHOLDER__\/\//\"$escaped_desktop\"/" $config fi fi #Ubuntu MID wants to be installed with --automatic if [ -f "/root/usr/share/ubuntu-mid-default-settings/mid-gui-start" ]; then if [ -f "/root/usr/share/applications/ubiquity.desktop" ]; then sed -i 's/--desktop/--automatic --desktop/' "/root/usr/share/applications/ubiquity.desktop" fi fi #Ubuntu MID uses kourou, and the ubiquity icon should be easy to find if [ -f "/root/usr/lib/hildon-desktop/kourou.py" ]; then if [ -f "/root/etc/xdg/menus/home.menu" ]; then sed -i '/<\/Include>/i\ ubiquity.desktop' "/root/etc/xdg/menus/home.menu" fi fi log_end_msg casper/scripts/casper-bottom/49kubuntu_mobile_session0000775000000000000000000000025112321311227020353 0ustar #! /bin/sh if [ -d /root/usr/share/kubuntu-mobile-default-settings/ ]; then cp /root/usr/share/kubuntu-mobile-default-settings/share/nodm /root/etc/default/nodm fi casper/scripts/casper-bottom/24preseed0000775000000000000000000000435012321311227015210 0ustar #! /bin/sh PREREQ="" DESCRIPTION="Loading preseed file..." prereqs () { echo "$PREREQ" } case $1 in # get pre-requisites prereqs) prereqs exit 0 ;; esac . /scripts/casper-functions load_confmodule log_begin_msg "$DESCRIPTION" if [ -e /preseed.cfg ]; then casper-set-selections /preseed.cfg fi network_started= start_network () { [ -z "$network_started" ] || return [ -z "$NETBOOT" ] || return mount -n -o bind /sys /root/sys mount -n -o bind /proc /root/proc mount -n -o bind /dev /root/dev mkdir -p /root/var/run/network # Close inherited fd's to prevent debconf-communicate from # continuing to run post-casper. for device in /sys/class/net/*/device; do name=$(basename ${device%*/device}) chroot /root dhclient $name 3>&- 4<&- done network_started=1 } stop_network () { [ "$network_started" ] || return for device in /sys/class/net/*/device; do name=$(basename ${device%*/device}) chroot /root ifconfig $name down done umount /root/sys umount /root/proc umount /root/dev } locations= for x in $(cat /proc/cmdline); do case $x in preseed/file=*) locations="${x#preseed/file=} $locations" ;; file=*) locations="${x#file=} $locations" ;; url=*) url_location="${x#url=}" start_network chroot /root wget -P /tmp "$url_location" locations="/tmp/$(basename "$url_location") $locations" ;; */*\?=*) question="${x%%\?=*}" value="${x#*\?=}" casper-preseed /root "$question" "$value" false ;; */*=*) question="${x%%=*}" value="${x#*=}" casper-preseed /root "$question" "$value" ;; debian-installer/locale=*|locale=*) value="${x#*=}" value="$(grep "^$value" /root/usr/share/i18n/SUPPORTED | grep UTF-8 | sed -e 's, .*,,' -e q)" casper-preseed /root debian-installer/locale "$value" ;; esac done if [ "$locations" ]; then for item in $locations; do casper-set-selections "/root$item" done fi if db_get preseed/early_command && [ "$RET" ]; then EARLY="$RET" if db_get preseed/allow-network && [ "$RET" = true ]; then start_network fi DEBIAN_HAS_FRONTEND= DEBCONF_REDIR= \ DEBIAN_FRONTEND=noninteractive \ sh -c "$EARLY" fi stop_network # Clear out debconf database backup files to save memory. rm -f /root/var/cache/debconf/*.dat-old log_end_msg exit 0 casper/scripts/casper-bottom/33enable_apport_crashes0000775000000000000000000000121212321311227020076 0ustar #!/bin/sh PREREQ="" DESCRIPTION="Enabling detection of crashes..." prereqs() { echo "$PREREQ" } case $1 in # get pre-requisites prereqs) prereqs exit 0 ;; esac . /scripts/casper-functions log_begin_msg "$DESCRIPTION" # During development releases apport is enabled, no need to change anything; # for released versions, enable it only for Ubiquity (LP #593606) if grep -q 'enabled=0' /root/etc/default/apport; then sed -i 's/enabled=0/enabled=1/' /root/etc/default/apport mkdir -p /root/etc/apport/whitelist.d/ echo "/usr/lib/ubiquity/bin/ubiquity" > /root/etc/apport/whitelist.d/ubiquity fi log_end_msg casper/scripts/casper-bottom/30accessibility0000775000000000000000000000431212321311227016403 0ustar #!/bin/sh # If you are looking to change accessibility profile settings, plesae look in # bin/casper-a11y-enable. PREREQ="" DESCRIPTION="Configuring accessibility options..." prereqs() { echo "$PREREQ" } case $1 in # get pre-requisites prereqs) prereqs exit 0 ;; esac . /scripts/casper-functions log_begin_msg "$DESCRIPTION" for x in $(cat /proc/cmdline); do case $x in # Lesser Visual Impairment access=v1) /root/usr/bin/casper-a11y-enable -initramfs -user="$USERNAME" -chroot=/root -script high-contrast ;; # Moderate Visual Impairment access=v2) /root/usr/bin/casper-a11y-enable -initramfs -user="$USERNAME" -chroot=/root -script magnifier ;; # Blindness access=v3) /root/usr/bin/casper-a11y-enable -initramfs -user="$USERNAME" -chroot=/root -script blindness ;; # Braille braille=ask) /root/usr/bin/casper-a11y-enable -initramfs -user="$USERNAME" -chroot=/root -script braille ;; # Minor Motor Difficulties access=m1) /root/usr/bin/casper-a11y-enable -initramfs -user="$USERNAME" -chroot=/root -script keyboard-modifiers ;; # Motor Difficulties - pointing devices access=m2) /root/usr/bin/casper-a11y-enable -initramfs -user="$USERNAME" -chroot=/root -script onscreen-keyboard ;; maybe-ubiquity|only-ubiquity) NO_A11Y_DESKTOP_FILE=1 ;; esac done # Write out a desktop file that will be triggered if the screen-reader-enabled # gsettings key is enabled, to set up the screen reader profile. THis key # is enabled if the user launches orca with a shortcut key. We don't want # to write out the file if the user is running oem-config, or botts directly # into ubiquity, where there is code to deal with the setting of the profile. if [ -z "$NO_A11Y_DESKTOP_FILE" ]; then cat < /root/etc/xdg/autostart/screen-reader-profile.desktop [Desktop Entry] Type=Application Name=Screen Reader Accessibility Profile Exec=/usr/bin/casper-a11y-enable blindness NoDisplay=true AutostartCondition=GSettings org.gnome.desktop.a11y.applications screen-reader-enabled X-GNOME-AutoRestart=false OnlyShowIn=GNOME;Unity; EOF fi log_end_msg casper/scripts/casper-bottom/22desktop_settings0000775000000000000000000000335712321311227017156 0ustar #!/bin/sh PREREQ="" DESCRIPTION="Applying desktop settings..." prereqs() { echo "$PREREQ" } case $1 in # get pre-requisites prereqs) prereqs exit 0 ;; esac . /scripts/casper-functions log_begin_msg "$DESCRIPTION" # Apply the gsettings overrides ## Avoid adding duplicate sections when using persistent storage if [ -f /root/usr/share/glib-2.0/schemas/casper.gschema.override ]; then rm /root/usr/share/glib-2.0/schemas/casper.gschema.override fi schemas_version=$(chroot /root /usr/bin/dpkg-query -W --showformat='${Version}' gsettings-desktop-schemas 2>/dev/null) || schemas_version="" if [ -n "$schemas_version" ]; then printf "[org.gnome.desktop.lockdown]\ndisable-lock-screen=true\n" >> /root/usr/share/glib-2.0/schemas/casper.gschema.override printf "[org.gnome.desktop.screensaver]\nlock-enabled=false\n" >> /root/usr/share/glib-2.0/schemas/casper.gschema.override chroot /root glib-compile-schemas /usr/share/glib-2.0/schemas/ fi # Apply the kde-profile overrides if [ -f /root/usr/share/kubuntu-default-settings/kde-profile/default/share/config/kdesktoprc ]; then if [ -f /rofs/usr/share/kubuntu-default-settings/kde-profile/default/share/config/kdesktoprc ]; then cp /rofs/usr/share/kubuntu-default-settings/kde-profile/default/share/config/kdesktoprc \ /root/usr/share/kubuntu-default-settings/kde-profile/default/share/config/kdesktoprc else rm /root/usr/share/kubuntu-default-settings/kde-profile/default/share/config/kdesktoprc fi fi if [ -d /root/usr/share/kubuntu-default-settings/kde-profile/default/share/config ]; then printf "[ScreenSaver]\nLock=false\n" >> /root/usr/share/kubuntu-default-settings/kde-profile/default/share/config/kdesktoprc fi log_end_msg casper/scripts/casper-bottom/35fix_language_selector0000775000000000000000000000117412321311227020115 0ustar #! /bin/sh PREREQ="" DESCRIPTION="Fixing language selector..." prereqs() { echo "$PREREQ" } case $1 in # get pre-requisites prereqs) prereqs exit 0 ;; esac . /scripts/casper-functions log_begin_msg "$DESCRIPTION" if [ -e /rofs/usr/share/applications/language-selector.desktop ]; then sed '/^Exec/ s|/usr/bin/gnome-language-selector|& -n|' \ /rofs/usr/share/applications/language-selector.desktop \ > /root/usr/share/applications/language-selector.desktop fi if [ -x /root/usr/bin/fontconfig-voodoo ]; then chroot /root fontconfig-voodoo --auto --quiet || true fi log_end_msg casper/scripts/casper-bottom/07remove_oem_config0000775000000000000000000000125012321311227017240 0ustar #!/bin/sh PREREQ="" DESCRIPTION="Removing oem-config if installed..." prereqs() { echo "$PREREQ" } case $1 in # get pre-requisites prereqs) prereqs exit 0 ;; esac . /scripts/casper-functions load_confmodule # Reset oem-config/enable to false (for persistent installs) db_set oem-config/enable false # Only do this on ARM if ! uname -m | grep -q arm; then exit 0; fi log_begin_msg "$DESCRIPTION" # if oem-config is installed, we need to remove it to remove the desktop # file diversion, and to remove the OEM icons from showing up before we # install the image. chroot /root apt-get -y --purge remove oem-config not in initramfs export PATH="${PATH}:/usr/lib/klibc/bin" fi sys2dev() { sysdev=${1#/sys} echo "/dev/$(udevadm info -q name -p ${sysdev} 2>/dev/null|| echo ${sysdev##*/})" } subdevices() { sysblock=$1 r="" for dev in "${sysblock}" "${sysblock}"/*; do if [ -e "${dev}/dev" ]; then r="${r} ${dev}" fi done echo ${r} } is_supported_fs () { # FIXME: do something better like the scan of supported filesystems fstype="${1}" case ${fstype} in vfat|iso9660|udf|ext2|ext3|ext4|btrfs|ntfs) return 0 ;; esac return 1 } get_fstype() { local FSTYPE local FSSIZE eval $(fstype < $1) if [ "$FSTYPE" != "unknown" ]; then echo $FSTYPE return 0 fi /sbin/blkid -s TYPE -o value $1 2>/dev/null } where_is_mounted() { device=$1 if grep -q "^$device " /proc/mounts; then mountpoint="$(grep "^$device " /proc/mounts | awk '{print $2; exit}')" grep "^$device " /proc/mounts | read d mountpoint rest echo $mountpoint return 0 fi return 1 } lastline() { while read lines ; do line=${lines} done echo "${line}" } base_path () { testpath="${1}" mounts="$(awk '{print $2}' /proc/mounts)" testpath="$(busybox realpath ${testpath})" while true ; do if echo "${mounts}" | grep -qs "^${testpath}" ; then set -- `echo "${mounts}" | grep "^${testpath}" | lastline` echo ${1} break else testpath=`dirname $testpath` fi done } fs_size () { # Returns used/free fs kbytes + 5% more # You could pass a block device as $1 or the mount point as $2 dev="${1}" mountp="${2}" used="${3}" if [ -z "${mountp}" ]; then mountp=$(where_is_mounted "${dev}") if [ "$?" -gt 0 ]; then mountp="/mnt/tmp_fs_size" mkdir -p "${mountp}" mount -t $(get_fstype "${dev}") -o ro "${dev}" "${mountp}" doumount=1 fi fi if [ "${used}" = "used" ]; then size=$(du -ks ${mountp} | cut -f1) size=$(expr ${size} + ${size} / 20 ) # FIXME: 5% more to be sure else # free space size="$(df -k | grep -s ${mountp} | awk '{print $4}')" fi if [ -n "${doumount}" ]; then umount "${mountp}" rmdir "${mountp}" fi echo "${size}" } setup_loop() { local fspath=$1 local module=$2 local pattern=$3 local offset=$4 modprobe ${MP_QUIET} -b "$module" udevadm settle if [ "$module" = loop ]; then if [ ! -e /dev/loop0 ]; then # temporary workaround for kernel bug for i in 0 1 2 3 4 5 6 7; do mknod "/dev/loop$i" b 7 "$i" || true done fi dev="$(losetup -f)" if [ "$dev" ]; then if [ -n "$offset" ]; then losetup -o "$offset" "$dev" "$fspath" else losetup "$dev" "$fspath" fi echo "$dev" return 0 else panic "No loop devices available" fi else for loopdev in $pattern; do if [ "$(cat $loopdev/size)" -eq 0 ]; then dev=$(sys2dev "${loopdev}") if [ -n "$offset" ]; then losetup -o "$offset" "$dev" "$fspath" else losetup "$dev" "$fspath" fi echo "$dev" return 0 fi done panic "No loop devices available" fi } # Returns 0 on success # panics if remount- or bind-mount fails # returns 1 on failure otherwise try_mount () { dev="${1}" mountp="${2}" opts="${3}" if where_is_mounted ${dev} > /dev/null; then if [ "${opts}" != "ro" ]; then mount -o remount,"${opts}" ${dev} $(where_is_mounted ${dev}) || panic "Remounting failed" return 0 fi mount -o bind $(where_is_mounted ${dev}) ${mountp} || panic "Cannot bind-mount" return 0 else mount -t $(get_fstype "${dev}") -o "${opts}" "${dev}" "${mountp}" ret=$? if [ $ret -ne 0 ]; then log_warning_msg "Cannot mount ${dev} on ${mountp}" return 1 fi return 0 fi } find_cow_device() { pers_label="${1}" cow_backing="/${pers_label}-backing" if [ -z "${PERSISTENT_PATH}" ]; then pers_fpath=${pers_label} else pers_fpath=${PERSISTENT_PATH}/${pers_label} fi for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -v loop); do # do not ever probe floppies, probing nonexistant ones delays the boot to half an hour and longer n=${sysblock##*/} if [ "${n#fd}" != "$n" ]; then continue fi for dev in $(subdevices "${sysblock}"); do devname=$(sys2dev "${dev}") if [ "$(/sbin/blkid -s LABEL -o value $devname 2>/dev/null)" = "${pers_label}" ]; then echo "$devname" return # Do not add any filesystem types here that might be able to # mount a journalled filesystem and replay the journal. Doing so # will cause data loss when a live CD is booted on a system # where filesystems are in use by hibernated operating systems. elif [ "$(get_fstype ${devname})" = "vfat" ]; then mkdir -p "${cow_backing}" try_mount "${devname}" "${cow_backing}" "rw" || continue cow_backing_mp=$(where_is_mounted "${devname}") if [ -e "${cow_backing_mp}/${pers_fpath}" ]; then echo $(setup_loop "${cow_backing_mp}/${pers_fpath}" "loop" "/sys/block/loop*") return 0 else umount ${cow_backing_mp} fi fi done done } find_files() # return the first of $filenames found on vfat and ext2 devices # FIXME: merge with above function { filenames="${1}" snap_backing="/snap-backing" for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -v loop); do for dev in $(subdevices "${sysblock}"); do devname=$(sys2dev "${dev}") devfstype="$(get_fstype ${devname})" if [ "${devfstype}" = "vfat" ] || [ "${devfstype}" = "ext2" ] ; then # FIXME: all supported block devices should be scanned mkdir -p "${snap_backing}" try_mount "${devname}" "${snap_backing}" "ro" || continue for filename in ${filenames}; do if [ -e "${snap_backing}/${filename}" ]; then echo "${devname} ${snap_backing} ${filename}" return 0 fi done umount ${snap_backing} fi done done } casper/conf.d/0000775000000000000000000000000012321311227010364 5ustar casper/caspermon/0000775000000000000000000000000012321311227011204 5ustar casper/caspermon/GNOME_PythonAppletCasper.server0000664000000000000000000000241112321311227017144 0ustar casper/caspermon/caspermon-applet0000775000000000000000000000377412321311227014417 0ustar #!/usr/bin/python import pygtk pygtk.require('2.0') import gtk import gnome.applet import subprocess import os # A simple applet to display the utilization of the snapshot device # during a casper session # # Matt Zimmerman # TODO: # - tooltip with details # - flash at threshold class CasperApplet: def __init__(self, applet, iid): self.timeout_interval = 1000 self.device = 'casper-snapshot' self.capacity = [0,0] self.datafile = '/var/lib/casper/snapshot-status' # initializate the gnome internals gnome.init("casper", "0.1") self.applet = applet self.tooltips = gtk.Tooltips() self.hbox = gtk.HBox() applet.add(self.hbox) # add the second button event for the popup menu and the enter mouse event to change the tooltip value self.ev_box = gtk.EventBox() #self.ev_box.connect("button-press-event",self.button_press) self.ev_box.connect("enter-notify-event", self.update_info) self.hbox.add(self.ev_box) self.prog = gtk.ProgressBar() self.ev_box.add(self.prog) self.update_info() gtk.timeout_add(self.timeout_interval,self.update_info, self) applet.connect("destroy",self.cleanup) applet.show_all() def update_info(self, event=None): self.capacity = self.read_info() self.prog.set_fraction(float(self.capacity[0]) / self.capacity[1]) self.prog.update() def read_info(self): fields = open(self.datafile).readline().split() if fields[2] != 'snapshot': return None return map(int,fields[3].split('/', 1)) def cleanup(self): # what goes here? pass def casper_factory(applet, iid): CasperApplet(applet, iid) return gtk.TRUE gnome.applet.bonobo_factory("OAFIID:GNOME_PythonAppletCasper_Factory", gnome.applet.Applet.__gtype__, "casper", "0", casper_factory) casper/caspermon/caspermond0000664000000000000000000000030312321311227013256 0ustar #!/bin/sh STATEFILE=/var/run/caspermond/status.casper-snapshot while true; do dmsetup status /dev/mapper/casper-snapshot > $STATEFILE.new mv $STATEFILE.new $STATEFILE sleep 60 done casper/debian/0000775000000000000000000000000012321312536010443 5ustar casper/debian/manpage/0000775000000000000000000000000012321311227012047 5ustar casper/debian/manpage/casper.70000664000000000000000000001475112321311227013424 0ustar .TH CASPER 7 "Thu, 28 Sep 2006" "1.69" "Initramfs-tools hook" .SH NAME casper \- a hook for initramfs-tools to boot live systems. .SH SYNOPSIS .B BOOT=casper As kernel parameter boot prompt. .SH DESCRIPTION Casper is a hook for initramfs-tools used to generate an initramfs capable to boot live systems as those created by make-live. This includes the Debian-Live isos, netboot tarballs, and usb stick images and Ubuntu live cds. At boot time it will look for a (read-only) media containing a "/casper" directory where a root filesystems (often a compressed squashfs) is stored. If found, it will create a writable environment, using unionfs, for debian like systems to boot from. .SH RECOGNIZED BOOT OPTIONS .TP .B casper-getty This enables a special "serial" login shell (experimental). .TP .B xdebconf uses xdebconfigurator, if present on the rootfs, to configure X instead of the standard procedure (experimental). .TP .BI "hostname=" HOSTNAME " , userfullname=" USERFULLNAME " , username=" USERNAME Those parameters lets you override values read from the config file. .TP .BI "{keyb|kbd-chooser/method}=" KEYBOARD " , {klayout|console-setup/layoutcode}=" LAYOUT " , {kvariant|console-setup/variantcode}=" VARIANT " , {kmodel|console-setup/modelcode}=" CODE " , koptions=" OPTIONS Configure the running keyboard as specified, if this one misses casper behaves as if "keyb=us" was specified. It will be interfered from "locale=" if locale is only 2 lowecase letters as a special case. You could also specify console layout, variant, code, and options (no defaults). .TP .BI ip= IFACE,ADDRESS,NETMASK,GATEWAY [ :IFACE,ADDRESS,NETMASK,GATEWAY "]*" Let you specify the name(s) and the options of the interface(s) that should be configured at boot time. Do not specify this if you want to use dhcp (default). .TP .BR ip[= frommedia ] If this variable is set, dhcp and static configuration are just skipped and the system will use the (must be) media-preconfigured /etc/network/interfaces instead. .TP .BI "{live-media|bootfrom}=" DEVICE If you specify one of this two equivalent forms, casper will first try to find this device for the "/casper" directory where the read-only root filesystem should reside. If it did not find something usable, the normal scan for block devices is performed. .TP .BI "live-media-offset=" BYTES This way you could tell casper that your image starts at offset BYTES in the above specified or autodiscovered device, this could be useful to hide the debian-live iso or image inside another iso or image, to create "clean" images. .TP .BI "live-media-path=" PATH Sets the path to the live filesystem on the medium. By default, it is set to "/casper" and you should not change that unless you have customized your media accordingly. .TP .BI "locale=" LOCALE " | debian-installer/locale=" LOCALE Configure the running locale as specified, if not present the live-media rootfs configured locale will be used and if also this one misses casper behave as "locale=en_US.UTF-8" was specified. If only 2 lowercase letter are specified (like "it"), the "maybe wanted" locale is generated (like it:IT.UTF-8), in this case if also "keyb=" is unspecified is set with those 2 lowercase letters (keyb=it). .TP .BR "netboot[=" nfs "|" cifs ] This tells casper to perform a network mount. The parameter "nfsroot=" (with optional "nfsopts="), should specify where is the location of the root filesystem. With no args, will try cifs first, and if it fails nfs. .TP .B persistent Casper will look for persistent and snapshot partitions or files labeled "casper-rw", "home-rw", and files called "casper-sn*", "home-sn*" and will try to, in order: mount as /cow the first, mount the second in /home, and just copy the contents of the latter in appropriate locations (snapshots). Snapshots will be tried to be updated on reboot/shutdown. Look at casper-snapshot(1) for more informations. .TP .B nopersistent disables the above mentioned "persistent" feature, useful if the bootloader (like syslinux) has been installed with persistent enabled. .TP .BI "persistent-path=" PATH Casper will look for persistency files in the root directory of a partition. With this parameter, the path can be configured so that you can have multiple directories on the same partition to store persistency files. .TP .B "showmounts" This parameter will make casper to show on "/" the ro filesystems (mostly compressed) on /casper. This is not enabled by default because could lead to problems by applications like "mono" which store binary paths on installation. .TP .B textonly Start up to text-mode shell prompts, disabling the graphical user interface. .TP .BI "todisk=" DEVICE Adding this parameter, casper will try to copy the entire read-only media to the specified device before mounting the root filesystem. It probably needs a lot of free space. Subsequent boots should then skip this step and just specify the "live-media=DEVICE" boot parameter with the same DEVICE used this time. .TP .B toram Adding this parameter, casper will try to copy the whole read-only media to the computer's RAM before mounting the root filesystem. This could need a lot of ram, according to the space used by the read-only media. .TP .BI "{preseed/file|file}=" FILE A path to a file present on the rootfs could be used to preseed debconf database. .TP .B preseed/allow-network=true Bring up the network while running .BR preseed/early_command . .TP .BI "package/question=" VALUE All debian installed packages could be preseeded from command-line that way, beware of blanks spaces, they will interfere with parsing, use a preseed file in this case. .TP .BI "uuid=" UUID Check that the discovered medium matches .I UUID rather than the default UUID embedded in the initramfs. .TP .BI ignore_uuid Do not check that any UUID embedded in the initramfs matches the discovered medium. .B casper may be told to generate a UUID by setting CASPER_GENERATE_UUID=1 when building the initramfs. .TP .BI noprompt Do not prompt to eject the CD on reboot. .SH FILES .B /etc/casper.conf some variables can be configured via this config file. .SH BUGS .B casper works fully on amd64, i386 and ppc, it should also run on other archs. .SH HOMEPAGE Debian Live project .SH SEE ALSO .BR casper-snapshot(1), initramfs-tools(8), make-live(8), make-live.conf(5) .SH AUTHOR casper was written by Tollef Fog Heen , Matt Zimmerman , and Marco Amadori . .TP This manual page was written by Marco Amadori , for the Debian project (but may be used by others). casper/debian/manpage/casper-snapshot.10000664000000000000000000000460612321311227015251 0ustar .TH "CASPER-SNAPSHOT" 1 "Thu, 28 Sep 2006" "0.0.1" "User commands" .SH NAME casper-snapshot \- a simple script to ease persistence usage. .SH SYNOPSIS .B casper-snapshot .RB [\| \-c \||\| \-\-cow .IR DIRECTORY \|] .RB [\| \-d \||\| \-\-device .IR DEVICE \|] .RB [\| \-e \||\| \-\-exclude\-list .IR FILE \|] .RB [\| \-o \||\| \-\-output .IR FILE \|] .RB [\| \-t \||\| \-\-type .IR TYPE \|] .PP .B casper-snapshot .RB \-r \||\| \-\-resync\-string .IR STRING .br .B casper-snapshot .RB \-h \||\| \-\-help .br .B casper-snapshot .RB \-u \||\| \-\-usage .br .B casper-snapshot .RB \-v \||\| \-\-version .SH DESCRIPTION Casper-snapshot is a script which can be used to build the right types of persistent image files supported by casper. It is also used on exit by the casper init script to resync the boot-found snapshots devices. .SH OPTIONS .TP .BI "\-c, \-\-cow" " DIRECTORY" specifies the input directory to be cloned in the image file. Its default value "/cow" should be right for most uses. However it could be handy to specify "/home" and type ext2 for the type to prepare an image file suited to be directly mounted by casper as home. .TP .BI "\-d, \-\-device" " DEVICE" sets the device where the media which the snapshot/persistence file/partition will be put. If it is not specified, a tmpfs will be used and linked to the user's desktop to move it where it is needed. If the device has no filesystem, an ext2 fs will be automatically created and labelled according to the values specified after the "--output" value or with a sane default. .TP .BI "\-e, \-\-exclude\-list" " FILE" a file containing a list of filenames/paths that should not be saved. This exclude list will be remebered on the target snapshot media for reuse. .TP .BI "\-o, \-\-output" " FILE" the filename/label used for the output file/partition. If left blank, casper-snapshot will search for a proper file on the device or use the whole partition. .TP .BI "\-r, \-\-resync\-string" " STRING" internally used on resyncs. .TP .BI "\-t, \-\-type" " TYPE" Type could be one of "cpio", "squashfs" or "ext2". .SH BUGS .B casper-snapshot Time (and BTS) will tell. .SH HOMEPAGE Debian Live project .SH SEE ALSO .BR casper(7) .SH AUTHOR casper-snapshot was written Marco Amadori . .TP This manual page was written by Marco Amadori , for the Debian project (but may be used by others). casper/debian/casper.postinst0000664000000000000000000000005412321311227013520 0ustar #!/bin/sh update-initramfs -u #DEBHELPER# casper/debian/copyright0000664000000000000000000000470512321311227012400 0ustar Author: Tollef Fog Heen Matt Zimmerman Colin Watson Copyright: License (casper-md5check/md5.c, casper-md5check/md5,h}): Copyright (C) 1999-2002 Aladdin Enterprises All rights reserved. This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. License (bin/casper-set-selections): The Debian installer preseeder is copyright 2004 by Joey Hess and others. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. License (everything else): Copyright (C) 2006 Marco Amadori Copyright (C) 2005-2011 Canonical Ltd. Copyright (C) 2008 Dell Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA On Debian and Ubuntu systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL file. casper/debian/casper.install0000664000000000000000000000073612321311227013312 0ustar bin/casper-getty sbin bin/casper-login sbin bin/casper-new-uuid sbin bin/casper-preseed usr/share/casper bin/casper-reconfigure usr/share/casper bin/casper-set-selections usr/share/casper bin/casper-snapshot sbin bin/casper-update-initramfs usr/share/casper hooks usr/share/initramfs-tools scripts usr/share/initramfs-tools conf.d usr/share/initramfs-tools conf-hooks.d usr/share/initramfs-tools casper-md5check/casper-md5check usr/lib/casper casper.conf etc casper/debian/source/0000775000000000000000000000000012321311227011737 5ustar casper/debian/source/format0000664000000000000000000000001512321311227013146 0ustar 3.0 (native) casper/debian/changelog0000664000000000000000000044544312321312536012333 0ustar casper (1.340) trusty; urgency=medium * Remove 23etc_modules which does more harm than good (LP: #1296386) -- Adam Conrad Wed, 09 Apr 2014 12:45:13 -0600 casper (1.339) trusty; urgency=medium * scripts/casper: Fix for new udev that doesn't have by-path. Original patch from http://goo.gl/R76aKl (LP: #1293811) -- Mario Limonciello Wed, 19 Mar 2014 09:22:38 -0500 casper (1.338) trusty; urgency=medium * scripts/casper-bottom/30accessibility: If the user boots to the desktop, write a desktop file to /etc/xdg/autostart to set up the screen reader profile if the user launches Orca with a shortcut key. Gnome/Unity settings daemon takes priority over ubiquity with keygrabs, such that the profile setting code in ubiquity does not get executed when the shortcut is entered. Temporarily disabling the shortcut key also doesn't work, as Gnome/Unity settings daemon doesn't appear to notice the change when the gsettings key is changed on the command-line. As such, this is a cludge, until a better mechanism for handling accessibility profiles is implemented. -- Luke Yelavich Mon, 10 Mar 2014 14:59:02 +1100 casper (1.337) trusty; urgency=low * 25adduser: add ubiquity-kdeui.desktop to plasma-netbook init template -- Harald Sitter Tue, 04 Feb 2014 11:23:26 +0100 casper (1.336ubuntu1) saucy; urgency=low * Update link to Kubuntu docs in scripts/casper-bottom/25adduser -- Jonathan Riddell Tue, 24 Sep 2013 16:16:38 +0100 casper (1.336) saucy; urgency=low * 25adduser: Adjust to rename of ubiquity-gtkui.desktop to ubiquity.desktop -- Jeremy Bicha Fri, 02 Aug 2013 10:04:11 +0100 casper (1.335) saucy; urgency=low * 22desktop_settings: - Don't require gnome-screensaver to disable the lock screen since Ubuntu GNOME no longer includes gnome-screensaver - Don't override the gnome-shell favorites since that's already handled in ubuntu-gnome-default-settings -- Jeremy Bicha Mon, 24 Jun 2013 21:57:59 -0400 casper (1.334) saucy; urgency=low * Use spaces instead of hyphens for the Name field of ubiquity's .desktop (LP: #651098) -- Jeremy Bicha Mon, 24 Jun 2013 12:08:44 +0200 casper (1.333) saucy; urgency=low * Remove hardcoded paths to udevadm (LP: #1184066). -- Colin Watson Tue, 28 May 2013 11:19:12 +0100 casper (1.332) raring; urgency=low * Don't wait for keystroke when prompt != 1 (preseeded reboots). (LP: #1172653) -- Stéphane Graber Thu, 25 Apr 2013 12:05:02 +0200 casper (1.331) raring; urgency=low * Re-order the eject code so that the message is rendered before the eject which should fix the case where fonts or other bits are missing and the message can't be rendered. (LP: #966480) * Also detect swap space on virtio. -- Stéphane Graber Tue, 23 Apr 2013 19:46:18 +0200 casper (1.330) raring; urgency=low [ Stéphane Graber ] * Move cifs related modules to the right place. [ Colin Watson ] * Use correct compiler and pkg-config when cross-building. -- Colin Watson Mon, 03 Dec 2012 15:56:49 +0000 casper (1.329) raring; urgency=low * Skip images called ltsp.squashfs or server.squashfs as those are shipped on the Edubuntu images but aren't intended to be used for the live environment. * Cleanup mixed tabs/spaces in the main casper script. * Bump standards, no change required. * Set a valid Vcs-Bzr URL. -- Stéphane Graber Sun, 18 Nov 2012 18:18:22 -0500 casper (1.328) quantal; urgency=low * Fix path to .disk/info in 41apt_cdrom (LP: #1065827). -- Colin Watson Fri, 12 Oct 2012 12:05:15 +0100 casper (1.327) quantal; urgency=low [ Tim Lunn ] * add gnome-shell favorites tweak to 25adduser * Add 16gdmnopasswd script, removes gdm password dialog for live user. [ Stéphane Graber ] * Fix casper when running on some RAID systems. (LP: #1047316, LP: #965735) * Apply patch by Tyler Gates to try and better handle dm devices, should help with the above change too. (LP: #865529) * Use /sys/class/net/ instead of hardcoded eth* devices. (LP: #905828, LP: #962546) * Allow overriding username/userfullname/hostname on the boot command line as is mentioned in the manpage but was never implemented. Note that when using persistence, those used for the first boot will be remembered through /etc/casper.conf (LP: #907482) * Reset oem-config/enable to false every boot. (LP: #838680) * Add Breaks/Replaces to ubiquity-casper to properly upgrade when both casper and ubiquity-casper are installed. (LP: #1046300) * Apply patch by cleary to avoid hang in 41apt_cdrom when .disk/info doesn't exist. (LP: #909919) * Eject by block device instead of mountpoint, this should avoid ejecting the cdrom on USB installations. (LP: #869238) * Add 'check' target to debian/rules based on ubiquity's (LP: #570243) -- Stéphane Graber Wed, 03 Oct 2012 17:46:39 -0400 casper (1.326) quantal; urgency=low * 22desktop_settings: - Rename 22screensaver to 22desktop_settings - Move 22gnome_panel_data's content to 22desktop_settings - Flush overrides in 22desktop_settings to avoid getting duplicate keys when using persistence. - Check for gsettings-desktop-schemas instead of gnome-panel-data * 35fix_language_selector: - Use sed against the original file (from rofs) instead of the target file. This avoids another case where the change is re-applied at every boot when using persistence. * 25adduser: - Remove RUNNING_UNDER_GDM from /etc/environment which was a big hack for back when we still used xscreensaver and was getting appended with every single boot. - Use /etc/sudoers.d instead of appending to /etc/sudoers, avoid getting duplicate lines with every reboot. * 23networking: - Change default /etc/network/interfaces to match that in /rofs, makes it easier to diff /etc when debugging casper. * casper-init, casper, 19-keyboard, casper-functions: - Remove any remaining reference to usplash as it's been deprecated for a long long time and just makes things harder to read. * casper-update-initramfs: - Exit when called from a non-writable media (cdrom) or when called from ubiquity. This fixes a > 1 minute wait when clicking "Try Ubuntu". * 19keyboard: - Add code to detect that the keyboard layout changed from the previous value and flush the gsettings key so that the indicator is properly reset. (LP: #946406) * 43disable_updateinitramfs: - Don't try to chmod a dangling symlink. - Only write /usr/sbin/update-initramfs if it doesn't already exist. * postinst: - Remove code generating symlink for /usr/sbin/update-initramfs to /usr/share/casper/casper-update-iniramfs as the diversion and symlinking is done in the initramfs and that code was only useful when the shim was first introduced. (LP: #984276) * scripts/casper: - Allow specifying live-media on the command line, helps when booting computers that are unable to boot a CD/USB disk. (LP: #423616) - Fix NFSOPTS handling by adding the needed comma and sticking it to the existing "ro" option of nfsmount (LP: #476208) * 22serialtty: - Move 22serialtty to 26serialtty to avoid overriding the newly generated upstart jobs. Note that this will spawn getty instead of login, but it's probably for the best as we need a specific baudrate. (LP: #747888) -- Stéphane Graber Tue, 02 Oct 2012 18:11:44 -0400 casper (1.325) quantal; urgency=low [ Logan Rosen ] * Remove 26disable_user_menu script, as it is obsolete (LP: #1057234) [ Tim Lunn ] * Patch [UG]ID_MIN in login.defs so that live user shows up in GDM. [ Didier Roche ] * Remove more obsolete gsettings indicator value set -- Didier Roche Fri, 28 Sep 2012 09:37:34 +0200 casper (1.324) quantal; urgency=low [ Tim L ] * Remove logout menu item without affecting 'power off' item -- Tim Lunn Mon, 17 Sep 2012 13:35:41 +0100 casper (1.323) quantal; urgency=low [ Tim L ] * Fix auto login script for GDM 3.5 (LP: #1046630) * reenable suppress logout for GNOME Classic -- Luke Yelavich Wed, 12 Sep 2012 12:59:03 +1000 casper (1.322) quantal; urgency=low * Fix typo in a11y-profile-settings job description. * Update paths used to divert away check-new-release and check-new-release-gtk. -- Colin Watson Wed, 05 Sep 2012 17:47:07 +0100 casper (1.321) quantal; urgency=low * bin/casper-a11y-enable: Remove session setting code. Now that Unity 2D is no longer available, setting the session to Ubuntu 2D causes a login loop until the session is changed. -- Luke Yelavich Thu, 16 Aug 2012 13:35:29 +1000 casper (1.320) quantal; urgency=low * scripts/casper: Add match for platform-tegra-ehci USB controllers to allow for finding live filesystems on external USB media on tegra platforms. -- Luke Yelavich Sat, 21 Jul 2012 17:41:31 +1000 casper (1.319) quantal; urgency=low * Remove conf.d/compcache as compcache doesn't exist anymore. A possible replacement would be zram. * Add md4 and des_generic to the initramfs, required by cifs. * Revert my previous change as the network-manager override isn't actually needed when the /e/n/i logic works (and marks the interface as manual). * Update paths to net-$INTERFACE.conf to /run/ as it now lives there instead of /tmp. (LP: #1013843) -- Stéphane Graber Tue, 03 Jul 2012 22:36:16 -0400 casper (1.318) quantal; urgency=low * Move the casper-a11y script from casper to ubiquity-casper so the script is available for use in OEM config mode. -- Luke Yelavich Wed, 20 Jun 2012 16:15:53 +1000 casper (1.317) quantal; urgency=low * scripts/casper-bottom/44pk_allow_ubuntu: grant admin polkit privileges to lightdm user, which enables restart and shutdown from the greeter (LP: #855556) -- Alex Chiang Tue, 22 May 2012 11:32:24 -0400 casper (1.316) quantal; urgency=low * Add dependency on cifs-utils for cifs NETBOOT support of desktop images. * Disable network-manager when installing from NETBOOT, otherwise we loose access to the media when NM starts, causing the system to freeze. -- Stéphane Graber Mon, 30 Apr 2012 15:39:32 +0200 casper (1.315) precise; urgency=low * Fix sed call for rc_domain (LP: #973794) * Ensure resulting resolv.conf is always clean and valid. -- Stéphane Graber Wed, 18 Apr 2012 11:33:49 +0200 casper (1.314) precise; urgency=low * bin/casper-a11y-enable: Call dbus-send with the --print-reply command-line argument, and send the output to null, as we don't need it. For some reason dbus-send only executes our commands when --print-reply is given. -- Luke Yelavich Tue, 03 Apr 2012 11:36:32 +1000 casper (1.313) precise; urgency=low * bin/casper-a11y-enable: - Remove code to create a sudoers config file that is no longer needed in the at-spi dbus world we now live in, thanks to Attila Hammer for the patch. (LP: #964985) - Disable the calendar in all low vision accessibility profiles as it has issues with keyboard navigation, thanks to Attila Hammer for the patch. (LP: #965015) - Do not hard code the ubuntu-2d session name in the set_session method. * ubiquity-hooks/30accessibility: - Use the orca settings from the live session for unity-greeter on the installed system, thanks to Attila Hammer for the patch. (LP: #968929) -- Luke Yelavich Mon, 02 Apr 2012 16:39:26 +1000 casper (1.312) precise; urgency=low * bin/casper-reconfigure: Unset DEBIAN_HAS_FRONTEND, DEBIAN_FRONTEND, and DEBCONF_REDIR so that casper-reconfigure properly uses the noninteractive frontend when invoked from a ubiquity target-config hook (LP: #955617). -- Colin Watson Mon, 19 Mar 2012 22:06:38 +0000 casper (1.311) precise; urgency=low * LightDM on kubuntu-active wants to start ubuntu.desktop, workaround in 15autologin for now -- Jonathan Riddell Thu, 15 Mar 2012 11:56:25 +0000 casper (1.310) precise; urgency=low * bin/casper-a11y-enable: - Use the unity-greeter gsettings keys for accessibility settings. - Enable high contrast in unity-greeter when the high contrast profile is selected. - Remove functionality to set gconf values for the login manager, unity-greeter uses gsettings. -- Luke Yelavich Thu, 15 Mar 2012 14:41:29 +1100 casper (1.309) precise; urgency=low * scripts/casper-bottom/14locales: - Stop dealing with /etc/environment - Always overwrite /etc/default/locale at boot time - Use /root/rofs/etc/default/locale as the base locale (LP: #951397) * scripts/casper-bottom/19keyboard - Reset /etc/default/keyboard if present in the overlay (LP: #953999) * scripts/casper-bottom/50ubiquity-bluetooth-agent - Only do the diversion the first time around -- Stéphane Graber Tue, 13 Mar 2012 17:00:58 -0400 casper (1.308) precise; urgency=low * Reconfigure jackd2 if jackd/tweak_rt_limits has been preseeded (LP: #923810). -- Colin Watson Tue, 13 Mar 2012 10:33:24 +0000 casper (1.307) precise; urgency=low * Add 50ubiquity-bluetooth-agent to detect ubiquity-bluetooth-agent and make bluetooth-applet call it instead (using dpkg-divert + ln). (LP: #644198) -- Stéphane Graber Fri, 09 Mar 2012 11:56:44 -0500 casper (1.306) precise; urgency=low [ Sergey "Shnatsel" Davidoff ] * Comment on the recently-introduced FLAVOUR variable in casper.conf. [ Stéphane Graber ] * in 23networking, when writing resolv.conf detect resolvconf and write to /run/resolvconf/interfaces/casper instead. (LP: #946215) -- Stéphane Graber Mon, 05 Mar 2012 15:38:23 -0500 casper (1.305) precise; urgency=low * Wait for debconf-communicate to exit before trying to copy the database. (LP: #940908) -- Stéphane Graber Wed, 29 Feb 2012 21:48:39 -0500 casper (1.304) precise; urgency=low * 25adduser: Back up and restore passwd/{root,user}-password{,-again} as well (LP: #924535). -- Colin Watson Wed, 01 Feb 2012 22:44:38 +0000 casper (1.303) precise; urgency=low * 25adduser: Restore previous contents of the debconf questions we set, rather than just resetting them (LP: #924535). -- Colin Watson Wed, 01 Feb 2012 10:16:58 +0000 casper (1.302) precise; urgency=low * Move adduser script to run after preseed so that preseeding passwd/user-default-groups is useful in the live session (LP: #923810). -- Colin Watson Mon, 30 Jan 2012 22:13:04 +0000 casper (1.301) precise; urgency=low * 41apt_cdrom: use standard logging to facilitate debugging thanks to cleary for the patch (LP: #909916) -- Brian Murray Wed, 25 Jan 2012 15:14:09 -0800 casper (1.300) precise; urgency=low * 33enable_apport_crashes: If enabling apport (i. e. on a released Ubuntu versions), only report crashes for Ubiquity. Do not report general desktop-ish crashes, for the same reasons why we disable them for Ubuntu releases after installation. (LP: #593606) -- Martin Pitt Tue, 24 Jan 2012 10:12:26 +0100 casper (1.299) precise; urgency=low * Fix the variable to be $FLAVOUR. -- Mario Limonciello Tue, 17 Jan 2012 16:36:24 -0600 casper (1.298) precise; urgency=low * Write out a new casper.conf with derivative values if they've been changed. - Fixes applications that parse /etc/casper.conf from breaking. - This can be reverted after the livecd-rootfs task from LP: #904482 is fixed. -- Mario Limonciello Mon, 16 Jan 2012 22:30:47 -0600 casper (1.297) precise; urgency=low * scripts/casper: look for live image on AC100/Tegra2 specific eMMC block device too. -- Jani Monoses Mon, 09 Jan 2012 18:56:57 +0200 casper (1.296) precise; urgency=low * Rework the reboot logic to not use udisks (doesn't work without dbus) and try to handle any kind of install media. (LP: #600740) -- Stéphane Graber Thu, 15 Dec 2011 12:28:08 -0500 casper (1.295) precise; urgency=low * Convert keys from gconf to gsettings: - 22gnome_panel_data: disable_lock_screen (LP: #610345) - 15autologin: suppress-logout-menuitem (indicator) * Syntax cleanup in debian/casper.init (replacing tabs by spaces) * Base the hostname and username on the media name (LP: #290351) * If udisks is present and considers a device has non-removable then don't call eject and don't show the prompt. (LP: #600740) -- Stéphane Graber Wed, 14 Dec 2011 15:50:44 -0500 casper (1.294) precise; urgency=low * scripts/casper: look for live image on OMAP specific MMC block devices too. * Sync up source package with bzr branch, they had conflicting changes for the same version (1.293) -- Jani Monoses Tue, 13 Dec 2011 02:08:40 +0200 casper (1.293) precise; urgency=low * Change KDE path profile for disable_restart_notifications. Thanks to Enrique Hernández Bello for the patch (LP: #898721). -- Brian Murray Wed, 07 Dec 2011 16:35:53 -0800 casper (1.292) precise; urgency=low * Do not let single quotes get into resolv.conf, otherwise DNS lookups will fail. -- Evan Dandrea Fri, 25 Nov 2011 17:00:58 +0000 casper (1.291) precise; urgency=low * Just add the live username to /etc/sudoers rather than relying on it to be in the admin group, which is no longer the case as of user-setup 1.39ubuntu1 (LP: #893060). -- Colin Watson Mon, 21 Nov 2011 18:06:13 +0000 casper (1.290) precise; urgency=low [ Mario Limonciello ] * Allow the "device" UUID to be used to resolve UUIDs in addition to the UUID in .disk/info. Useful for situations that the casper filesystem is on a disk and that disk's UUID is specified on kernel command line. [ Colin Watson ] * Use '/sbin/udevadm test-builtin path_id' rather than /lib/udev/path_id, which was removed in udev 174. -- Colin Watson Thu, 10 Nov 2011 14:27:01 +0000 casper (1.289) precise; urgency=low * Canonicalise debian-installer/locale= / locale= into a UTF-8 locale when processing preseeding, in line with how we set up the locale in the live environment (LP: #882308). -- Colin Watson Tue, 08 Nov 2011 15:34:57 +0000 casper (1.288) precise; urgency=low * Ignore lines in md5sum.txt that aren't md5sum output (LP: #873401). -- Colin Watson Mon, 24 Oct 2011 17:05:55 +0100 casper (1.287) oneiric; urgency=low * Remove typo from 26disable_user_menu that led the script to believe that indicator-session was never actually installed. -- Adam Conrad Wed, 12 Oct 2011 14:00:48 +0100 casper (1.286) oneiric; urgency=low * Convert the gsettings calls to using the gsettings override files because we don't have DBUS in casper. -- Stéphane Graber Wed, 12 Oct 2011 13:38:53 +0100 casper (1.285) oneiric; urgency=low * scripts/casper: - enable use of virtio devices in is_nice_device() -- Ante Karamatic Thu, 06 Oct 2011 17:17:42 +0100 casper (1.284) oneiric; urgency=low * bin/casper-a11y-enable: - Set the session by calling AccountService via dbus instead of using lightdm commands, as we cannot run lightdm-set-defaults as a user - Add some extra spaces to make sure the startup scripts used to set a11y settings are syntactically correct - Add some other needed settings for various profiles for use in the login manager - Set correct permissions for the orca config directory once the config files have been created - Make sure the startup script checks take into account the ability to be run from the initramfs * ubiquity-hooks/30accessibility: - Make sure that accessibility profile settings are properly applied at install time, even if the user decided to try Ubuntu first, and then run the install from the desktop - Copy any existing orca configuration to the target system - Make sure profile settings are not set up twice -- Luke Yelavich Wed, 14 Sep 2011 16:19:59 +1000 casper (1.283) oneiric; urgency=low * scripts/casper-bottom/22screensaver: Set gsettings key instead of gconf. * scripts/casper-bottom/44pk_allow_ubuntu: Drop old PolicyKit stuff, it's gone for a long time. * Drop scripts/casper-bottom/45disable_guest_account: We are not using gdm any more, and lightdm implements that differently. * Drop scripts/casper-bottom/47une_ubiquity, UNE/netbook-launcher are history. * Add scripts/casper-bottom/26disable_user_menu: Disable the user indicator menu. (LP: #834137) -- Martin Pitt Wed, 07 Sep 2011 12:33:57 +0200 casper (1.282) oneiric; urgency=low * bin/casper-a11y-enable: Fix typo/syntax error in the set_session function -- Luke Yelavich Wed, 07 Sep 2011 15:20:05 +1000 casper (1.281) oneiric; urgency=low * bin/casper-a11y-enable: - Change all remaining references of gdm to lightdm, particularly in the usage help text, and the username of the login manager - Set the default login session to ubuntu-2d for screen reader and braille profiles -- Luke Yelavich Mon, 05 Sep 2011 15:02:31 +1000 casper (1.280) oneiric; urgency=low * Don't fail to set up autologin on a commented out autologin-user line in lightdm custom conf. (LP: #836727) -- Mario Limonciello Mon, 29 Aug 2011 09:16:00 -0500 casper (1.279) oneiric; urgency=low * hooks/casper: pull in overlayfs kernel module to allow use of overlayfs as the union mount during install. -- Andy Whitcroft Fri, 19 Aug 2011 13:03:27 +0100 casper (1.278) oneiric; urgency=low * scripts/casper-bottom/15autologin: - handling lightdm.conf in the case we already have a configuration file (to avoid overwriting it on the cd if we don't have the default gtk greeter installed if greeter not specified). Flavors should now use set-lightdm-defaults to set the default session and greeter, even if this still works with current alternatives method. -- Didier Roche Thu, 11 Aug 2011 09:05:43 +0200 casper (1.277) oneiric; urgency=low * Add an extra command-line argument to casper-a11y-helper which will create a startup script that will be executed either on first boot after install, or once we switch out of the initramfs to boot the live session. This is needed to work around gsettings not working when chrooting to the target environment with no dbus running. * Add extra checks to the ubiquity accessibility target-config hook to determine whether accessibility was enabled during the running of ubiquity, and act accordingly. * Call the casper a11y helper script with the newly added -script argument as per above. * Determine whether we are root by checking the $HOME variable. * Do not call the a11y profile script in debug mode -- Luke Yelavich Fri, 05 Aug 2011 15:22:27 +1000 casper (1.276) oneiric; urgency=low * If lightdm.conf exists, remove it first to avoid issues with symlinks. -- Stéphane Graber Thu, 04 Aug 2011 12:26:08 -0400 casper (1.275) oneiric; urgency=low * Update 15autologin to overwrite any existing lightdm configuration. This should fix lightdm autologin for everyone. Any custom lightdm configuration won't apply to the live environment. -- Stéphane Graber Wed, 03 Aug 2011 10:10:48 -0400 casper (1.274) oneiric; urgency=low * Remove log_end_message call (LP: #820284). -- Evan Dandrea Wed, 03 Aug 2011 12:01:57 +0100 casper (1.273) oneiric; urgency=low [ Mario Limonciello ] * scripts/casper: Add support for SAS controllers now that 575297 is fixed. (LP: #819564) [ Stéphane Graber ] * lightdm no longer ships with /etc/lightdm/lightdm.conf in its package. Updating 15autologin casper hook to create one when missing. (LP: #819609) -- Stéphane Graber Tue, 02 Aug 2011 17:47:10 -0400 casper (1.272) oneiric; urgency=low [ Andy Whitcroft ] * scripts/casper: add support for overlayfs for union mounts of the liveCD [ Luke Yelavich ] * Port the rest of the accessibility profile settings to gsettings, except where gconf settings are required, eg firefox and gksu * bin/casper-a11y-enable: Extract the username from the $HOME environment variable, as $USER is not set when ubiquity calls the script, even with all privileges dropped -- Luke Yelavich Wed, 27 Jul 2011 15:20:11 +1000 casper (1.271) oneiric; urgency=low * bin/casper-a11y-enable: - Use -x when enabling debug mode - Adjust some variable quoting when checking for package versions - Do not break out of the command-line checking loop at all, let it run its course until there are no command-line values left to parse -- Luke Yelavich Fri, 01 Jul 2011 11:47:31 +0100 casper (1.270) oneiric; urgency=low * Depend on lzma for our diverted update-initramfs (LP: #790794). -- Colin Watson Thu, 30 Jun 2011 10:30:49 +0100 casper (1.269) oneiric; urgency=low [ Luke Yelavich ] * bin/casper-a11y-helper: - Migrate blindness and braille accessibility profiles to gsettings for all except gksu, which still uses gconf to store settings. [ Colin Watson ] * Add LightDM autologin support (LP: #797669). -- Colin Watson Fri, 17 Jun 2011 12:52:44 +0100 casper (1.268) oneiric; urgency=low The big accessibility profile code refactor: * debian/copyright: Update Canonical copyright years to include 2011 * bin/casper-a11y-helper: Create a new script that will be callable from casper/the initramfs, ubiquity at the maybe-ubiquity screen, and ubiquity when running through ubiquity-hooks during the installation process. - Copy accessibility profile settings from both scripts/casper-bottom/30accessibility and ubiquity-hooks/30accessibility - Refactor profile settings into groups of common settings for low vision and motor profiles, with the rest of the settings broken up into individual methods for each profile - Add options to allow for calling the script from within the initramfs - Do a few more package checks to make sure the target environment has the commands we need to set things up * scripts/casper-bottom/30accessibility && ubiquity-hooks/30accessibility: - Remove old profile settings and support code, and make use of the new a11y helper script - Call the helper with debugging enabled for now, to help with testing to make sure the new helper is executing properly * debian/casper.install: Add casper-a11y-helper -- Luke Yelavich Wed, 08 Jun 2011 15:35:39 +1000 casper (1.267) oneiric; urgency=low * scripts/casper-bottom/32disable_hibernation: Drop obsolete gnome-power-manager and kde-profile configuration, and just globally disable hibernation via policykit. (LP: #610351) -- Martin Pitt Wed, 08 Jun 2011 07:25:43 +0200 casper (1.266) oneiric; urgency=low * Disable release-upgrade prompts in the live session (LP: #777759). -- Colin Watson Thu, 05 May 2011 12:28:33 +0100 casper (1.265) natty; urgency=low * scripts/casper-bottom/30accessibility && ubiquity-hooks/30accessibility: - Use gsettings to adjust yelp caret navigation, as properly fixed in yelp 3.0.1 * ubiquity-hooks/30accessibility: Fix the gset function to set settings for the target username, and not the username of the live user -- Luke Yelavich Mon, 11 Apr 2011 16:47:46 +1000 casper (1.264) natty; urgency=low * scripts/casper-bottom/30accessibility && ubiquity-hooks/30accessibility: - Enable yelp carrot navigation by default in the moderate visual impairment, blindness, and Braille profiles, thanks to Attila Hammer for the patch (LP: #752503) -- Luke Yelavich Thu, 07 Apr 2011 10:17:52 +1000 casper (1.263) natty; urgency=low [ Evan Dandrea ] * Suppress Log Out item in the live session (LP: #750140). [ Martin Pitt ] * scripts/casper-helpers, find_cow_device(): Do not ever probe floppy devices. There are lots of computers which still have a floppy controller (and thus a /dev/fd0), but no actual floppy. Trying to send anything to /dev/fd0 will result in very long timeouts. Here this causes booting the live CD to take more than 30 minutes. (See also LP #539515 for the corresponding bug in udev/udisks). (LP: #739774) -- Martin Pitt Mon, 04 Apr 2011 16:12:34 +0200 casper (1.262) natty; urgency=low * scripts/casper-bottom/30accessibility: - Don't blindly assume that there are no orca config files/directories in the created user's home directory. A derivative may have placed something in /etc/skel as part of the live filesystem, and we shouldn't be clobbering it, thanks to Attila Hammer for the pointer (LP: #744227) -- Luke Yelavich Mon, 04 Apr 2011 17:32:40 +1000 casper (1.261) natty; urgency=low * scripts/casper-bottom/30accessibility && ubiquity-hooks/30accessibility: - Also use classic GNOME for the "motor difficulties, pointing devices" profile, due to issues with on-screen keyboards and unity search -- Luke Yelavich Mon, 04 Apr 2011 16:15:59 +1000 casper (1.260) natty; urgency=low [ Colin Watson ] * Force apt-cdrom's mount point to /cdrom (LP: #723357). I've left the /media/cdrom symlink introduced in 1.259 in place anyway, as it's harmless on the live CD and may save some effort elsewhere. [ Luke Yelavich ] * scripts/casper-bottom/30accessibility && ubiquity-hooks/30accessibility: - Set the default session to classic GNOME for moderate visual impairement, blindness, and braille accessibility profiles (LP: #734659) - Fix a few dangling references to user-settings.py (LP: #744214) - Don't set /desktop/gnome/accessibility/keyboard/enable for vision related profiles (LP: #711131) -- Luke Yelavich Fri, 01 Apr 2011 16:13:07 +1100 casper (1.259) natty; urgency=low * scripts/casper-bottom/05mountpoints: Create a /media/cdrom -> /cdrom symlink, to work around apt's changed default mount point for Alpha-3. (LP: #727783) -- Martin Pitt Thu, 03 Mar 2011 11:52:38 +0100 casper (1.258) natty; urgency=low * scripts/casper-bottom/30accessibility && ubiquity-hooks/30accessibility: - Remove code that removes applets from the panel. Indicators are the way forward, and we have unity, which works differently. - Write orca configuration in json format - Set some settings in gsettings parallel to gconf, next cycle there will be a full migration to gsettings. - Do not change the default window manager setting, this will be done according to what is detected with unity/compiz et al. -- Luke Yelavich Wed, 23 Feb 2011 15:18:23 +1100 casper (1.257) natty; urgency=low * Handle $cow_backing already being mounted elsewhere (LP: #683260). -- Evan Dandrea Fri, 11 Feb 2011 16:41:11 +0000 casper (1.256) natty; urgency=low * Add scripts/casper-bottom/49kubuntu_mobile_session to run Kubuntu mobile session -- Jonathan Riddell Thu, 10 Feb 2011 17:42:34 +0000 casper (1.255) natty; urgency=low [ Evan Dandrea ] * Don't disable the free space notifier if using persistent storage. [ Daniel Manrique ] * scripts/casper-bottom/23networking: Strip quotes from DNSDOMAIN as returned by ipconfig, and sanitize the domain entry to ensure the generated /etc/resolv.conf is formatted correctly (LP: #709364). -- Colin Watson Tue, 01 Feb 2011 11:05:13 +0000 casper (1.254) natty; urgency=low * More fixes to the USB update-initramfs shim (LP: #591207): - Make the shim a proper executable in /usr/share/casper/casper-update-initramfs and symlink to it if necessary at boot time, so that new versions of this shim are automatically installed when casper is upgraded. - $bootdir/initrd.img may exist when $bootdir/vmlinuz doesn't; for example, if we're running off a fresh live USB stick and the kernel hasn't yet been upgraded. -- Colin Watson Thu, 20 Jan 2011 14:18:59 +0000 casper (1.253) natty; urgency=low * Don't try to process the initramfs and kernel if the real update- initramfs hasn't generated anything (LP: #557023). -- Evan Dandrea Wed, 05 Jan 2011 12:07:47 +0000 casper (1.252) natty; urgency=low * Cope with forthcoming console-setup changes: handle /etc/default/keyboard if present, and in that case preseed keyboard-configuration/* templates. -- Colin Watson Tue, 21 Dec 2010 16:44:54 +0000 casper (1.251) natty; urgency=low * scripts/casper-bottom/44pk_allow_ubuntu: Tweak the default PolicyKit policy to avoid dropping wireless connections when a user switches to another VT (LP: #656757) -- Mathieu Trudel-Lapierre Sat, 04 Dec 2010 13:11:23 +0000 casper (1.250) natty; urgency=low * Use LDLIBS rather than LDFLAGS for 'pkg-config --libs ply-boot-client', fixing link line ordering. -- Colin Watson Mon, 29 Nov 2010 13:28:17 +0000 casper (1.249) natty; urgency=low [ arky ] * Add universal access preferences taskbar icon in all accessibility profiles (LP: #621561). [ Serge Hallyn ] * change scripts/casper-helpers:try_mount() to not panic when regular mounts fail. Instead, return an error code so the caller can decide. (LP: #624632) [ Evan Broder ] * scripts/casper: Check for uuid= command line parameter in addition to /conf/uuid.conf file in initrd. (LP: #671786) [ Colin Watson ] * Document new uuid= option in casper(7). -- Colin Watson Mon, 29 Nov 2010 12:49:36 +0000 casper (1.248) maverick; urgency=low * ubiquity-hooks/30accessibility: Create .local/share subdirectory structure before copying files. Also copy orca files to ~/.local/share, instead ~/. Thanks to Attila Hammer for the patch. (LP: #650846) -- Luke Yelavich Tue, 05 Oct 2010 15:35:35 +1100 casper (1.247) maverick; urgency=low * Check for the existance of a kubuntu-default-settings directory before running scripts/casper-bottom/48kubuntu_disable_restart_notifications -- Jonathan Thomas Mon, 04 Oct 2010 17:43:21 -0400 casper (1.246) maverick; urgency=low * Added scripts/casper-bottom/07remove_oem_config - Added new script to remove oem-config if installed on the image on ARM, as it should never be installed on a non-preinstalled image. This is necessary because we can't exclude oem-config on the seed on a per-subarchitecture basis * scripts/casper/47une_ubiquity - Cause gconf changes to be made to both the 2D & 3D UNE launchers so ubiquity properly shows up in favorites regardless of which launcher is used (LP: #643791) -- Michael Casadevall Mon, 27 Sep 2010 17:52:50 -0400 casper (1.245) maverick; urgency=low * Add scripts/casper-bottom/49disable_kubuntu_restart_notify for a more surgical solution at disabling restart notifications on the Live CD * Don't remove the notificationhelper.desktop file in 34disable_kde_services -- Jonathan Thomas Tue, 28 Sep 2010 19:20:26 -0400 casper (1.244) maverick; urgency=low * scripts/casper-bottom/30accessibility && ubiquity-hooks/30accessibility: - Use orca's new settings location in ~/.local/share, as orca is now more XDG compliant -- Luke Yelavich Thu, 16 Sep 2010 09:38:21 +1000 casper (1.243) maverick; urgency=low * Backport from live-initramfs 1.154.6-1: - Adding patch from Thierry Walrant to allow setting a path for the persistence files through persistent-path boot parameter (Closes: #512661). * Follow symlinks when checking for dynamically linked files at reboot. -- Colin Watson Tue, 07 Sep 2010 10:53:32 +0100 casper (1.242) maverick; urgency=low * Update scripts/casper-bottom/34disable_kde_services to stop some new akonadi services -- Jonathan Riddell Mon, 06 Sep 2010 14:20:54 +0100 casper (1.241) maverick; urgency=low [ Mathieu Trudel-Lapierre ] * Use configure_networking at do_netmount; it's at least more resilient than a simple ipconfig call since it retries, and it properly parses BOOTIF to know which devices to configure. (LP: #602273) [ Colin Watson ] * Parse the machine-readable file written out by ipconfig rather than trying to parse its human-readable output. -- Colin Watson Fri, 20 Aug 2010 13:37:56 +0100 casper (1.240) maverick; urgency=high * scripts/casper - Added platform-sata_mv to is_nice_device() to allow Marvell Dove A0 and AVD1 to properly boot live media (LP: #618489) -- Michael Casadevall Mon, 16 Aug 2010 19:36:56 +0800 casper (1.239) maverick; urgency=low * scripts/casper-bottom/30accessibility && ubiquity-hooks/30accessibility: - Instead of mangling the main sudoers file, create a new file in /etc/sudoers.d and set permissions appropriately -- Luke Yelavich Wed, 11 Aug 2010 13:46:03 +1000 casper (1.238) maverick; urgency=low [ Alex Chiang ] * Disable ureadahead-other job as well as ureadahead (LP: #605695). -- Colin Watson Thu, 15 Jul 2010 11:49:36 +0100 casper (1.237) maverick; urgency=low [ Colin Watson ] * Add btrfs support. * Make ip=* command-line parsing more precise (thanks, Bill Nickless; LP: #586553). * Make the USB update-initramfs shim cope with vmlinuz and initrd.img being in /boot rather than / (LP: #591207). * Depend on file for /etc/init.d/casper (thanks, Alon Swartz; LP: #591213). * Conflict with live-initramfs, as they overlap and people can pick one or the other (LP: #453476). [ Martin Pitt ] * debian/casper.init: Change shutdown splash message to refer to "installation media" instead of "disc"; a lot of installs happen from USB sticks these days. Thanks to Debbie Beliveau for the idea. -- Colin Watson Mon, 28 Jun 2010 16:53:17 +0100 casper (1.236) lucid; urgency=low * Check for LTS in the release name (LP: #558488). -- Evan Dandrea Wed, 21 Apr 2010 11:12:32 +0100 casper (1.235) lucid; urgency=low * Unbreak early command from previous commit. -- Mario Limonciello Thu, 15 Apr 2010 02:54:15 -0500 casper (1.234) lucid; urgency=low * Only bring the network up while running preseed/early_command if preseed/allow-network=true. -- Colin Watson Wed, 14 Apr 2010 15:56:40 +0100 casper (1.233) lucid; urgency=low * Bring the network up while running preseed/early_command. * Fix use of debconf passthrough frontend; DEBCONF_READFD and DEBCONF_WRITEFD were backwards, and DEBIAN_HAS_FRONTEND and DEBCONF_REDIR needed to be unset or else confmodule scripts would end up trying to talk to closed file descriptors. * Run debconf-communicate with a read-only template database and separate config databases, and copy any changed values back to the master databases at the end. This allows us to use the noninteractive frontend rather than passthrough when running apt-get in preseed/early_command or dpkg to install driver updates, thereby ensuring that the template database is properly initialised (LP: #557011). -- Colin Watson Mon, 12 Apr 2010 23:41:09 +0100 casper (1.232) lucid; urgency=low * bump compcache size to 50% on live images for machines with less than 512MiB. This makes sure we don't hit OOM errors on systems with only 256MiB of RAM. -- Oliver Grawert Mon, 12 Apr 2010 08:10:06 +0200 casper (1.231) lucid; urgency=low [ Jonathan Riddell ] * Remove 37kubuntu_netbook_installer_link, now done with a patch in kdebase-workspace [ Colin Watson ] * If copying live media to RAM or disk, explicitly copy .disk, since * won't expand to include it (LP: #526305). * Cache /bin/plymouth and /sbin/usplash_write before ejecting the CD, in the hope that that helps with I/O errors on reboot (see LP #539027). [ Luke Yelavich ] * ubiquity-hooks/30accessibility: Copy the orca settings directory to the gdm home directory, to allow for preferred orca settings to be used in gdm (LP: #551515). -- Luke Yelavich Fri, 09 Apr 2010 14:00:51 +1000 casper (1.230) lucid; urgency=low * Don't save the hardware clock on live CD reboot; we used to do this in the sysvinit world, but it regressed when we switched to Upstart (thanks, Norm Pierce; LP: #436535). * When running update-initramfs on writable media, update initrd.lz rather than initrd.gz if it's present, and make the update process a bit safer while we're there (LP: #489736). * Handle toram and todisk=DEVICE options on command line (LP: #526305). * Policy version 3.8.4: no changes required. * Convert to source format 3.0 (native). -- Colin Watson Tue, 30 Mar 2010 11:41:24 +0100 casper (1.229) lucid; urgency=low [ Jonathan Riddell ] * Update scripts/casper-bottom/34disable_kde_services for lucid [ Evan Dandrea ] * Don't let apt try to auto-detect the CD-ROM device using udev. We already know what it is, and using udev to find it again wont work for USB disks. -- Evan Dandrea Tue, 23 Mar 2010 11:42:00 +0000 casper (1.228) lucid; urgency=low * Update for the new libplymouth2. -- Steve Langasek Fri, 12 Mar 2010 18:37:02 -0800 casper (1.227) lucid; urgency=low * casper-md5check: port from usplash to plymouth. LP: #500198 * fix up our reliance on usplash, /dev/console elsewhere. LP: #506418. -- Steve Langasek Fri, 12 Mar 2010 01:12:28 -0800 casper (1.226) lucid; urgency=low [ Colin Watson ] * Stop using removed nfsro option for NFS/unionfs (thanks, Bernhard Seibold; LP: #460781). [ Jonathan Riddell ] * Remove scripts/casper-bottom/48enable_kubuntu_netbook and ubiquity- hooks/48enable_kubuntu_netbook now enabled in kubuntu-netbook- default-settings -- Jonathan Riddell Wed, 10 Mar 2010 22:23:04 +0000 casper (1.225) lucid; urgency=low * Add ubiquity-hooks/49kubuntu_gnome_icon_cache to recreate the Gnome icon cache on Kubuntu CDs, removed by livecd-rootfs -- Jonathan Riddell Mon, 08 Mar 2010 11:47:01 +0000 casper (1.224) lucid; urgency=low * Remove ubiquity-hooks/35copy_wallpaper_cache as now implement it in ubiquity itself (LP: #530024) -- Didier Roche Mon, 01 Mar 2010 19:41:45 +0100 casper (1.223) lucid; urgency=low * Bind-mount /dev, /proc, and /sys into /root while running apt-cdrom. * Copy /lib/udev/rules.d/60-cdrom_id.rules into the initramfs to go with /lib/udev/cdrom_id, so that apt-cdrom will be able to find ID_CDROM=1 entries when we run it. This should stop update-notifier from repeatedly popping up during the live session. -- Colin Watson Tue, 23 Feb 2010 01:35:30 +0000 casper (1.222) lucid; urgency=low * scripts/casper-bottom/47une_ubiquity: - get back ubiquity favorite icon in UNE live (LP: #524381) - rename the script from 47unr_ubiquity to 47une_ubiquity as well as "UNR" mention -- Didier Roche Mon, 22 Feb 2010 14:01:25 +0100 casper (1.221) lucid; urgency=low * Remove the rest of the mythbuntu delta from 10adduser. It will be maintained in the mythbuntu-live-autostart package instead so that users from ~mythbuntu-dev can administer it. -- Mario Limonciello Sun, 21 Feb 2010 20:22:00 -0600 casper (1.220) lucid; urgency=low * scripts/casper: calculate memory without "head" utility, thanks to Petar Bogdanovic (LP: #25496). -- Kees Cook Fri, 19 Feb 2010 14:04:18 -0800 casper (1.219) lucid; urgency=low [ Mario Limonciello ] * Disable casper-reconfigure from 22gnome_panel_data. It doesn't (appear) to serve a functional purpose as the postinst does nothing different for laptops. [ Didier Roche ] * add 35copy_wallpaper_cache to copy the wallpaper cache created at boot time to the main user's directory. First boot will take it into account in ureadahead profiling -- Didier Roche Wed, 17 Feb 2010 19:14:53 +0100 casper (1.218) lucid; urgency=low * Allow dpkg and apt-get to be installed from within commands that operate in the chroot via early_command or driver updates. (LP: #521218) -- Mario Limonciello Tue, 16 Feb 2010 13:38:48 -0600 casper (1.217) lucid; urgency=low [ Luke Yelavich ] * ubiquity-hooks/30accessibility: Enable accessible login for the blindness and braile accessibility profiles. [ Colin Watson ] * Use egrep rather than 'grep -E' (LP: #512386). [ Julien Lavergne ] * 15autologin: Add support for LXDM autologin (LP: #511976). [ Evan Dandrea ] * Properly shut down debconf-communicate so that its database gets written (LP: #518272). -- Evan Dandrea Thu, 11 Feb 2010 08:25:53 +0000 casper (1.216) lucid; urgency=low [ Luke Yelavich ] * scripts/casper-bottom/30accessibility && ubiquity-hooks/30accessibility: - Remove code to disable pulseaudio, as it is no longer needed, and the supporting code in the pulseaudio package was removed a long time ago. - Set the default empathy theme to classic for blindness and braille accessibility profiles. [ Jamie Bennett ] * Speed up work around debconf-communicate. Replace several calls to debconf-communicate with one persistent invocation followed by confmodule calls. * Disable guest account by rm'ing rather than waiting for dpkg to remove it. -- Colin Watson Wed, 03 Feb 2010 16:41:57 -0800 casper (1.215) lucid; urgency=low [ Mario Limonciello ] * Support multiple preseed file/urlarguments on the kernel commandline rather than just selecting the last one and going with that. * debian/control: Set Vcs-Bzr. [ Jonathan Riddell ] * Add scripts/casper-bottom/48enable_kubuntu_netbook and ubiquity- hooks/48enable_kubuntu_netbook to enable Plasma Netbook workspace for Kubuntu Netbook Remix -- Jonathan Riddell Wed, 27 Jan 2010 13:55:42 +0000 casper (1.214) lucid; urgency=low * 15autologin: simplify the code with escape character evaluation (LP: #505140) -- Didier Roche Tue, 12 Jan 2010 08:57:05 +0100 casper (1.213) lucid; urgency=low * printf does not evaluate escape characters in the argument string. -- Evan Dandrea Mon, 11 Jan 2010 11:02:12 +0000 casper (1.212) lucid; urgency=low [ Martin Pitt ] * debian/control: Add ${misc:Depends}. * debian/control: Bump Standards-Version to 3.8.3 (no changes necessary). [ Colin Watson ] * 15autologin: Use printf rather than echo -e, since its behaviour is portable across shells. [ Evan Dandrea ] * Remove scripts/casper-bottom/42disable_apparmor. Apparmor 2.3.1+bzr1312-0ubuntu3 and ifupdown 0.6.8ubuntu26 now no-op when they detect the live CD environment. -- Evan Dandrea Fri, 08 Jan 2010 20:31:26 +0000 casper (1.211) lucid; urgency=low * Readd scripts/casper-bottom/15autologin changes: derivatives have now a custom.conf file and still need autologin in live version. Merge with my previous fix proposed for sponsoring one week ago: use echo -e to enable \n interpretation (/bin/sh is busybox ash which behavior differs from vanilla ash interpretor) (LP: #500786) -- Didier Roche Tue, 05 Jan 2010 20:05:26 +0100 casper (1.210) lucid; urgency=low [ Scott James Remnant ] * Dropped Vcs-Bzr headers, pushed to lp:ubuntu/casper * conf-hooks.d/casper: Changed to FRAMEBUFFER=y [ Colin Watson ] * Source /scripts/casper-functions and /scripts/casper-helpers only after processing 'prereqs' argument, to avoid lots of warnings with new initramfs-tools. -- Colin Watson Tue, 05 Jan 2010 16:54:54 +0000 casper (1.209) lucid; urgency=low * Revert the previous change to 15autologin and instead just make sure custom.conf does not exist. -- Evan Dandrea Mon, 04 Jan 2010 11:18:47 +0000 casper (1.208) lucid; urgency=low [ Martin Pitt ] * scripts/casper-bottom/25configure_init: sreadahead is no more, disable ureadahead instead. [ Didier Roche ] * scripts/casper-bottom/15autologin: Don't erase /etc/gdm/custom.conf but only append autologin on casper startup if needed. This avoids removing default session set in this file for ubuntu derivatives which use GDM. The script also check if the modification is already there for persistent usb keys. (LP: #498971) -- Martin Pitt Mon, 21 Dec 2009 15:54:36 +0100 casper (1.207) lucid; urgency=low * Drop 46_disable_services. It didn't need to be running on "all" systems with casper installed. Mythbuntu systems will pull this in via a package that is administerable via ~mythbuntu-dev. -- Mario Limonciello Tue, 24 Nov 2009 22:28:29 -0600 casper (1.206) karmic; urgency=low * Fix broken /cdrom writable test in 43disable_initramfs (LP: #450259). -- Evan Dandrea Thu, 22 Oct 2009 11:49:15 +0100 casper (1.205) karmic; urgency=low * scripts/casper-bottom/25configure_init: Disable sreadahead on live CD boot. Not only does it profile the live CD boot to no benefit, but it also looks as if it may be responsible for breaking Wubi installs by reading from partman's synchronisation FIFOs (LP: #439279). -- Colin Watson Tue, 20 Oct 2009 17:32:02 +0100 casper (1.204) karmic; urgency=low * scripts/casper-bottom/30accessibility && ubiquity-hooks/30accessibility: - .pulse_a11y_nostart -> pulse_a11y_nostart due to being in a system directory, to completely match the change in pulseaudio, which I missed earlier. -- Luke Yelavich Wed, 14 Oct 2009 08:29:07 +1100 casper (1.203) karmic; urgency=low * scripts/casper-bottom/30accessibility && ubiquity-hooks/30accessibility: - Change .pulse_a11y_nostart location to /var/lib/pulseaudio, as per the change in pulseaudio itself, to solve a race condition with volume settings restore. -- Luke Yelavich Mon, 12 Oct 2009 08:31:51 +1100 casper (1.202) karmic; urgency=low * scripts/casper-bottom/46_disable_services: - MythTV backend is now an upstart service, so rename it's conf file in /etc/init, rather than using update-rc.d. -- Mario Limonciello Sun, 11 Oct 2009 13:47:00 -0500 casper (1.201) karmic; urgency=low [ Colin Watson ] * Don't prompt to eject the SD card on Babbage boards, since for now it's reused as a quasi-boot-floppy (LP: #364273). [ James Westby ] * scripts/casper-bottom/44pk_allow_ubuntu: update to work for polkit-1 as well. Allow the live cd user to perform any action when at the active console. (LP: #447141) -- Colin Watson Fri, 09 Oct 2009 16:06:53 +0100 casper (1.200) karmic; urgency=low * scripts/casper-bottom/20xconfig: - Fix xforcevesa to generate a good failsafe xorg.conf (LP: #423969) -- Mario Limonciello Thu, 08 Oct 2009 22:26:42 -0500 casper (1.199) karmic; urgency=low [ Tormod Volden ] * Scan device-mapper (RAID) devices for live filesystem (LP: #385305). -- Colin Watson Tue, 06 Oct 2009 23:39:57 +0100 casper (1.198) karmic; urgency=low * scripts/casper: Send PULSELOGO usplash command at startup. (LP: #438762) -- Martin Pitt Fri, 02 Oct 2009 13:51:07 +0200 casper (1.197) karmic; urgency=low [ Colin Watson ] * Fix tty device name construction to work with new upstart (LP: #438678). [ Loïc Minier ] * scripts/casper-bottom/22serialtty: pass -L to getty and set term to vt100. * scripts/casper-bottom/22serialtty: set +x... -- Colin Watson Thu, 01 Oct 2009 23:27:45 +0100 casper (1.196) karmic; urgency=low * Extend our hack that arranges to run setupcon after usplash exits to cover the new Upstartified usplash as well. -- Colin Watson Tue, 29 Sep 2009 01:36:55 +0100 casper (1.195) karmic; urgency=low [ Oliver Grawert ] * add support for serialtty= cmdline option for debugging purposes in live sessions [ Colin Watson ] * Upstart moved /etc/event.d/ to /etc/init/; adjust shell provision on VTs to match (LP: #434769). -- Colin Watson Mon, 28 Sep 2009 10:52:32 +0100 casper (1.194) karmic; urgency=low * Fix 47unr_ubiquity shell code to make slightly more sense. * Tell mkinitramfs that casper needs usplash (LP: #434980). -- Colin Watson Thu, 24 Sep 2009 01:29:21 +0100 casper (1.193) karmic; urgency=low * Sync LSB headers in init script with desired behaviour: don't start casper at boot, and stop after umountroot but before halt/reboot. -- Colin Watson Mon, 14 Sep 2009 13:08:23 +0100 casper (1.192) karmic; urgency=low [ Colin Watson ] * Upgrade to debhelper v7. [ Jonathan Riddell ] * Add 37kubuntu_netbook_installer_link to show ubiquity launcher -- Jonathan Riddell Sat, 12 Sep 2009 00:10:03 +0100 casper (1.191) karmic; urgency=low * Slightly re-work 47unr_ubiquity, so that ubiquity doesn't keep getting added to the favourites if persistence is used. -- Steve Kowalik Tue, 08 Sep 2009 20:35:00 +1000 casper (1.190) karmic; urgency=low [ Colin Watson ] * Don't produce an invalid sed program when trying to remove an applet which isn't in the panel (LP: #406188). [ Tormod Volden ] * do not remount filesystems that already have been probed when searching for the livefs (LP: #424464) * Fix quoting in try_snap (LP: #424742). * Silence error messages for non-existent device nodes (LP: #425159). -- Colin Watson Mon, 07 Sep 2009 13:10:53 +0100 casper (1.189) karmic; urgency=low * In 10adduser fix path to ubiquity-kde.desktop file -- Jonathan Riddell Wed, 02 Sep 2009 14:54:41 +0100 casper (1.188) karmic; urgency=low * Allow for platform-orion-ehci in ID_PATH to qualify as a "nice_device" i.e. one which can host a livefs. This is the name of the USB device driver on Marvell Dove boards. -- Loïc Minier Mon, 31 Aug 2009 14:16:21 +0200 casper (1.187) karmic; urgency=low * Stop recommending unionfs-fuse, as we're using aufs again in Karmic. -- Colin Watson Fri, 28 Aug 2009 12:07:14 +0100 casper (1.186) karmic; urgency=low [ Loïc Minier ] * Allow for platform-mxsdhci in ID_PATH to qualify as a "nice_device" i.e. one which can host a livefs. This is the new name of this device in 2.6.31 kernels on Babbage i.MX51. [ Steve Kowalik ] * Rename 47unr-ubiquity as 47unr_ubiquity, as scripts with dashes don't get installed into the initramfs. (LP: #411616) -- Steve Kowalik Fri, 14 Aug 2009 17:39:34 +1000 casper (1.185) karmic; urgency=low * Actually set 47unr-ubiquity as executable. -- Steve Kowalik Wed, 12 Aug 2009 10:41:35 +1000 casper (1.184) karmic; urgency=low [ Evan Dandrea ] * Apply the Ubuntu release version to the installer menu entries as well (LP: #406187). [ Colin Watson ] * Fix disabling of apt-check (LP: #406191). [ Steve Kowalik ] * Remove the UNR ubiquity .desktop hack in 10adduser. * Set ubiquity as a UNR Favourite in 47unr-ubiquity. -- Steve Kowalik Fri, 07 Aug 2009 23:11:58 +0100 casper (1.183) karmic; urgency=low * Remove erroneous /root prefix on the ubiquity desktop files in 10adduser. -- Evan Dandrea Tue, 21 Jul 2009 14:02:34 +0100 casper (1.182) karmic; urgency=low [ Evan Dandrea ] * Busybox sed does not preserve ownership, so chown after using it. [ Colin Watson ] * Set AutomaticLogin=$USERNAME, not =ubuntu (thanks, arky; LP: #401321). [ Mario Limonciello ] * Add support for lzma type archives to casper-new-uuid. -- Mario Limonciello Mon, 20 Jul 2009 17:36:55 -0500 casper (1.181) karmic; urgency=low * Insert a version number in the name field for ubiquity's desktop file (LP: #154506). -- Evan Dandrea Wed, 15 Jul 2009 10:11:40 +0100 casper (1.180) karmic; urgency=low [ Colin Watson ] * scripts/casper-bottom/15autologin: Minor consistency fixes. [ Martin Pitt ] * scripts/casper-bottom/15autologin: Update for new gdm custom configuration file (/etc/gdm/custom.conf). (LP: #395861) -- Martin Pitt Mon, 06 Jul 2009 16:40:00 +0200 casper (1.179) karmic; urgency=low [ Colin Watson ] * If LIVE_MEDIA_PATH is set on the command line, record it in /etc/casper.conf for the benefit of ubiquity. [ Martin Pitt ] * scripts/casper-bottom/15autologin: Update to work with new gdm. -- Martin Pitt Fri, 03 Jul 2009 14:51:57 +0200 casper (1.178) karmic; urgency=low * Ensure that unionfs-fuse isn't killed by /etc/init.d/sendsigs on shutdown (LP: #386010). * Patches from "phl" (https://launchpad.net/~ubuntu-leledy), adjusted by me, to fix snapshot resync: - Avoid using cpio -u -d options if klibc cpio is in use (LP: #384059). - Copy /etc/casper.conf into /root, otherwise we forget snapshot resync settings (LP: #384061). - Adjust the first field of *SNAP entries in casper.conf to be relative to /cow, not /root (LP: #384066). - Prefix $DEST with $MOUNTP in casper-snapshot (LP: #384068). - /etc/init.d/casper is usually called with 'start', so handle that as well as 'stop' to do snapshot resyncing and CD ejecting (LP: #384076). * Fix casper-snapshot(1) syntax to avoid missing spaces between options and their values. * Fix showmounts when used in conjunction with unionfs-fuse; read-only filesystems need to be bind-mounted rather than move-mounted. -- Colin Watson Fri, 12 Jun 2009 13:24:28 +0100 casper (1.177) karmic; urgency=low * Port from Debian (thanks, Daniel Baumann): - Added live-media-path as suggested by Jordi Pujol. - Tail casper.log and show its messages during boot (thanks, Michal Suchanek; LP: #363886). -- Colin Watson Thu, 04 Jun 2009 03:10:59 +0100 casper (1.176) karmic; urgency=low [ Colin Watson ] * Fix symlinking of anacron to /bin/true. [ Martin Pitt ] * Drop scripts/casper-bottom/38jockey_disable_check: Some drivers, like wl or printer drivers, do need to be advertised in a live system. Jockey has been fixed to not advertise video drivers automatically if the packages aren't available (such as in the live system), and even if we should ever put them back, it is easier to disable the notifications in jockey's handlers instead of here. (LP: #381687) -- Martin Pitt Tue, 02 Jun 2009 15:40:05 +0200 casper (1.175) karmic; urgency=low * Suppress error message if /root/usr/share/applications/firefox-fav.desktop doesn't exist. * Add unionfs-fuse support. * Automatically fall back to unionfs-fuse if the default union filesystem is not available but unionfs-fuse is. -- Colin Watson Sun, 24 May 2009 12:28:00 +0100 casper (1.174) karmic; urgency=low * debian/control: Increase dependency on initramfs-tools to get the version that uses blkid, depend on util-linux as well * hooks/casper: No need to copy vol_id into the initramfs image. * scripts/casper-bottom/13swap: Use blkid -o udev -p instead of vol_id, there's probably a much cleaner way to check for RAID like this, but this is the direct equivalent. * scripts/casper-helpers (get_fstype): use a blkid call to get the type * scripts/casper-helpers (find_cow_device): use a blkid call to get the label -- Scott James Remnant Tue, 12 May 2009 13:29:41 +0100 casper (1.173) jaunty; urgency=low * Don't use head -n1 in where_is_mounted, we don't have head in the initramfs. LP: #363038. -- Steve Langasek Fri, 17 Apr 2009 22:22:06 -0700 casper (1.172) jaunty; urgency=low * 43disable_updateinitramfs: The /cdrom mount has been moved to /root/cdrom by the time this script runs, so check that instead. -- Colin Watson Thu, 09 Apr 2009 18:30:29 +0100 casper (1.171) jaunty; urgency=low * Set MP_QUIET to -q instead of -Q on Ubuntu as well, and not just for Debian as the modprobe in the latest upstream release of module-init-tools doesn't accept -Q anymore. -- Loic Minier Wed, 08 Apr 2009 17:31:40 +0200 casper (1.170) jaunty; urgency=low * is_nice_device(): allow devices with an ID_PATH of platform-mmc* as well as used for instance for SD cards on the ARM iMX51 Babbage board; LP: #357700. -- Loic Minier Wed, 08 Apr 2009 15:34:01 +0200 casper (1.169) jaunty; urgency=low * [ -w /cdrom ] turns out not to be a sufficient test for files under /cdrom being writable; with busybox, it always returns true even for read-only filesystems. Explicitly check for the read-only flag in mount output to work around this. * Fix where_is_mounted helper function to actually produce output (thanks, Steve Dodd; LP: #346941). * Add a comment to find_cow_device explaining why the choice of filesystems is restricted (I asked for this comment in LP #230703 but it apparently never got written). -- Colin Watson Tue, 07 Apr 2009 01:47:05 +0100 casper (1.168) jaunty; urgency=low * Fix writing of "$@" to diverted update-initramfs script (here-documents perform parameter expansion unless the delimiter is quoted). * Don't bring up a temporary network interface while fetching the preseed file when netbooting, as that will disconnect our root filesystem (LP: #351982). -- Colin Watson Tue, 31 Mar 2009 15:39:29 +0100 casper (1.167) jaunty; urgency=low * Disable kwallet from KDE 4 in 34disable_kde_services -- Jonathan Riddell Fri, 27 Mar 2009 18:40:35 +0000 casper (1.166) jaunty; urgency=low [ Emmet Hikory ] * Show the ubiquity icon in kourou (LP: #338730) [ Timo Jyrinki ] * Move examples.desktop to Desktop/ if it exists, as an alternative to Examples (LP: #45489). [ Luke Yelavich ] * scripts/casper-bottom/30accessibility && ubiquity-hooks/30accessibility: - Make the special case disabling of pulseaudio per user, and not system wide. - Also disable PulseAudio for the Braille profile. - Fix incorrect paths when chowning files. - Don't use /root for the ubiquity hook accessibility script, /target is where the installed system is located. - Remove laptop detect code. Its not currently working, and getting it to work requires invasive changes. - Only set pulseaudio settings and create the .orca directory if sed packages are installed on the live filesystem and installed system. * ubiquity-hooks/30accessibility: Copy orca settings to the installed system. -- Luke Yelavich Fri, 27 Mar 2009 14:38:20 +1100 casper (1.165) jaunty; urgency=low * scripts/casper-bottom/30accessibility && ubiquity-hooks/30accessibility: - When the blindness accessibility profile is chosen, create the .orca directory in the live user's home directory. This seems to allow orca to properly reload and use settings in the live session without needing to be restarted. This is only needed for the blindness profile, due to the other profiles that use orca already creating the .orca directory. (LP: #194992) -- Luke Yelavich Fri, 20 Mar 2009 08:37:20 +1100 casper (1.164) jaunty; urgency=low * Update 34disable_kde_services to not start update-notifier-kde or plasma's contact plugin which uses akonadi -- Jonathan Riddell Wed, 18 Mar 2009 18:07:52 +0000 casper (1.163) jaunty; urgency=low * 34disable_kwallet moved to 34disable_kde_services and disables various services not needed by live CDs -- Jonathan Riddell Fri, 13 Mar 2009 14:33:13 +0000 casper (1.162) jaunty; urgency=low * If /cdrom is writable, call the diverted update-initramfs and copy the resulting kernel and initrd to /cdrom/casper (LP: #292159). -- Evan Dandrea Tue, 10 Mar 2009 14:36:30 +0000 casper (1.161) jaunty; urgency=low [ Juanje Ojeda ] * Regenerate SSL certificate at boot so that it isn't the same for all live CD users (LP: #337723). -- Colin Watson Tue, 10 Mar 2009 10:39:21 +0000 casper (1.160) jaunty; urgency=low * scripts/casper-bottom/30accessibility && ubiquity-hooks/30accessibility: - Adjust sudoers file to allow ORBIT_SOCKET_DIR, XDG_SESSION_COOKIE and GTK_MODULES environment variables through to root, for v2, v3, and braille profiles. This allows users to use administrative GTK/GNOME applications executed by gksudo with accessibility tools like orca. -- Luke Yelavich Tue, 10 Mar 2009 15:38:17 +1100 casper (1.159) jaunty; urgency=low * scripts/casper-bottom/30accessibility && ubiquity-hooks/30accessibility: - Disable pulseaudio for the blindness profile, as pulseaudio and espeak and portaudio v19 do not play very well with each other, lots of crackling, cut of speech. At least espeak via ALSA natively is usable, and latency is relatively low. -- Luke Yelavich Tue, 10 Mar 2009 09:03:06 +1100 casper (1.158) jaunty; urgency=low * scripts/casper-bottom/30accessibility && ubiquity-hooks/30accessibility: - use laptop_detect function in blindness profile as well -- Luke Yelavich Mon, 09 Mar 2009 14:07:17 +1100 casper (1.157) jaunty; urgency=low [ Emmet Hikory ] * 10adduser: add Category=Favorites support for netbook-launcher (LP: #334656) [ Luke Yelavich ] * scripts/casper-bottom/30accessibility && ubiquity-hooks/30accessibility: - Remove the fast user switch applet from the top panel, to re-enable the logout/shutdown menu options in the system menu. This is done for the speech and braille accessibility profiles. Requiring several keyboard shortcuts to access something that is not entirely accessible yet only makes things difficult for blind/vision impaired users, and is likely to cause much confusion if sed menu entries are not present. -- Luke Yelavich Tue, 03 Mar 2009 15:49:21 +1100 casper (1.156) jaunty; urgency=low * scripts/casper-bottom/30accessibility & ubiquity-hooks/30accessibility: - If using a laptop, enable the laptop keyboard layout - There is no longer a need to set gconf values as root in only-ubiquity mode -- Luke Yelavich Fri, 06 Feb 2009 08:59:52 +0100 casper (1.155) jaunty; urgency=low [ Colin Watson ] * Add myself to debian/copyright as an author, as I've done fairly significant work on this. * Eliminate casper-md5check's libm linkage; patch from "SurJector" who points out that the automatic conversion is sufficient (LP: #293613). * Restore showmounts/show-cow option (thanks, Carlo de Wolf and "probono"; LP: #159006, #290330). [ Evan Dandrea ] * Add support for ext4. -- Colin Watson Fri, 30 Jan 2009 12:14:00 +0000 casper (1.154) jaunty; urgency=low [ Evan Dandrea ] * scripts/casper-bottom/02timezone: - Remove as it's no longer needed and resets the timezone when persistence is enabled (LP: #296855). [ Colin Watson ] * Preseed console-setup/optionscode and console-setup/codesetcode to the empty string on boot to avoid debris from the live filesystem build process getting in the way of installation (LP: #94177). -- Colin Watson Sun, 23 Nov 2008 12:44:45 +0000 casper (1.153) jaunty; urgency=low * scripts/casper-bottom/10adduser: - Create links for Mythbuntu items on the Desktop too. - Don't show removable drives on Mythbuntu desktop * scripts/casper-bottom/46disable_services: - New script for disabling services unnecessary to Live mode that should still start after being installed. -- Mario Limonciello Tue, 04 Nov 2008 01:25:59 -0600 casper (1.152) intrepid; urgency=low * Use kde4rc now for accessibility profiles -- Jonathan Riddell Sat, 25 Oct 2008 23:44:54 +0100 casper (1.151) intrepid; urgency=low * Force ubiquity to --automatic mode for ubuntu-mid -- Emmet Hikory Thu, 16 Oct 2008 15:31:16 +0100 casper (1.150) intrepid; urgency=low * Fix path to Kubuntu help file in 10adduser (really) -- Jonathan Riddell Thu, 16 Oct 2008 12:16:54 +0100 casper (1.149) intrepid; urgency=low * scripts/casper-bottom/30accessibility & ubiquity-hooks/30accessibility: - Revert to using gconf keys for starting orca, as this is now what orca does when the user chooses to automatically start orca from Orca's preferences window. - Explicitly set orca as the program to start up for magnification, speech, and braille. -- Luke Yelavich Thu, 16 Oct 2008 11:33:02 +1100 casper (1.148) intrepid; urgency=low * Skip remounting read-only in try_mount as it's unnecessary and breaks persistence. Thanks James Westby (LP: #274076). -- Evan Dandrea Wed, 15 Oct 2008 13:09:57 -0400 casper (1.147) intrepid; urgency=low * Fix path to Kubuntu help file in 10adduser -- Jonathan Riddell Wed, 15 Oct 2008 12:49:29 +0100 casper (1.146) intrepid; urgency=low * Update About Kubuntu link in 10adduser for KDE 4 -- Jonathan Riddell Mon, 06 Oct 2008 17:54:15 +0100 casper (1.145) intrepid; urgency=low * 38disable_restricted_manager: Remove some obsolete l-r-m and restricted-manager code, and rename the script to 38jockey_disable_check to better reflect its purpose. -- Martin Pitt Mon, 06 Oct 2008 09:21:40 +0200 casper (1.144) intrepid; urgency=low * Bump media detection timeout to a minute; thanks to Tormod Volden and Steve Beattie for analysis (LP: #258432). * Note that this changes (fixes?) the semantics of LIVEMEDIA_TIMEOUT due to not using hex values in a for loop which aren't understood by test -lt (thanks, Steve Beattie). -- Colin Watson Fri, 26 Sep 2008 18:35:13 +0100 casper (1.143) intrepid; urgency=low * scripts/casper-bottom/30accessibility & ubiquity-hooks/30accessibility: Change the way that orca is set to automatically start. Orca can be started via a gconf key, however this is not reflected in the orca UI, and doesn't easily allow the user to prevent orca from autostarting on an installed system. -- Luke Yelavich Wed, 24 Sep 2008 10:37:35 +1000 casper (1.142) intrepid; urgency=low * Fix syntax error introduced by is_nice_device regex fix. -- Colin Watson Fri, 19 Sep 2008 02:30:59 +0100 casper (1.141) intrepid; urgency=low [ Johannes Ballé ] * Handle spaces in file names in md5sum.txt (LP: #251112). [ Colin Watson ] * Support ?= (set value but don't mark as seen) preseeding syntax in preseed script; previously we only supported it in the keyboard script, which confusingly doesn't deal with propagating console-setup/* preseeds to the target filesystem (LP: #253749). * Update to localechooser's new languagelist format. [ Tormod Volden ] * scripts/casper: don't scan floppy drives for livefs images (LP: #97306) * scripts/casper: fix broken RE in is_nice_device() (LP: #250328) * scripts/casper: properly use argument $1 in matches_uuid() -- Colin Watson Fri, 19 Sep 2008 02:14:05 +0100 casper (1.140) intrepid; urgency=low [ Colin Watson ] * Disable jockey as well as the old restricted-manager. While jockey does do more than restricted-manager did, it also still uses a good chunk of memory for a use case that's fairly limited on the live CD. [ Luke Yelavich ] * scripts/casper-bottom/30accessibility & ubiquity-hooks/30accessibility: - Check that usr/bin/orca exists and is executable before creating user settings files. -- Luke Yelavich Fri, 12 Sep 2008 19:23:41 +1000 casper (1.139) intrepid; urgency=low * add compcache conf.d configuration for initramfs-tools -- Oliver Grawert Thu, 14 Aug 2008 00:25:54 +0200 casper (1.138) intrepid; urgency=low [ Tormod Volden ] * use full path for vol_id in swap-on-raid detection (LP: #136804) [ Martin Pitt ] * 33enable_apport_crashes: Change the apport default file, not the update-notifier gconf keys, to undo the corresponding change for disabling apport right before the release. * Add 45disable_guest_account: Purge the gdm-guest-session package from the live system, since having guest sessions in a live session does not make much sense. (See gdm-guest-login spec) -- Martin Pitt Thu, 31 Jul 2008 14:19:07 +0200 casper (1.137) intrepid; urgency=low * Update scripts/casper-bottom/15autologin for KDM from KDE 4. * Update 32disable_hibernation for KDE 4. -- Jonathan Riddell Thu, 17 Jul 2008 13:41:38 +0100 casper (1.136) intrepid; urgency=low * Remove bad-and-wrong setting of PATH to include directories under /root; now that grep links to more libraries than before, this broke a number of things. Requires initramfs-tools (>= 0.92bubuntu5) because this doesn't work with klibc chroot. -- Colin Watson Fri, 11 Jul 2008 12:34:35 +0100 casper (1.135) intrepid; urgency=low [ Loic Minier ] * Fix use of PREREQ instead of PREREQS in hooks/casper. [ Colin Watson ] * Fix mount argument ordering for klibc mount. -- Colin Watson Wed, 09 Jul 2008 12:34:26 +0100 casper (1.134) intrepid; urgency=low [ Evan Dandrea ] * Do not use mode= when mounting /cow using persistent mode (LP: #219192). [ Colin Watson ] * Support ?= (set value but don't mark as seen) preseeding syntax for console-setup/* (LP: #64058). -- Colin Watson Mon, 30 Jun 2008 23:52:41 +0100 casper (1.133) intrepid; urgency=low [ Tormod Volden ] * Do not use swap on RAID raw devices (LP: #136804) [ Agostino Russo ] * Test if livemedia is a directory before trying to mount it as a loopfile * Reverted changes to casper-helpers as requested by Mithrandir since replaying the journal on a hibernated system would lead to file system corruption (LP: #230703). -- Evan Dandrea Wed, 18 Jun 2008 12:34:58 -0400 casper (1.132ubuntu0.2) hardy-proposed; urgency=low * Test if livemedia is a directory before trying to mount it as a loopfile * Reverted changes to casper-helpers as requested by Mithrandir since replaying the journal on a hibernated system would lead to file system corruption (LP: #230703). -- Agostino Russo Tue, 10 Jun 2008 00:27:12 +0100 casper (1.132ubuntu0.1) hardy-proposed; urgency=low * Do not scan only vfat volumes when looking for cow devices (LP: #230703) * Allow casper to use a squashfs filesystem within an arbitrary path (LP: #230716, #207137) -- Agostino Russo Thu, 15 May 2008 22:10:50 +0100 casper (1.132) intrepid; urgency=low [ Colin Watson ] * Switch default unionfs implementation to aufs. [ Agostino Russo ] * Do not scan only vfat volumes when looking for cow devices (LP: #230703) * Allow casper to use a squashfs filesystem within an arbitrary path (LP: #230716, #207137) -- Evan Dandrea Wed, 28 May 2008 15:01:30 -0400 casper (1.131) hardy; urgency=low [ Luke Yelavich ] * scripts/casper-bottom/30accessibility: Set gconf and orca config values as root in automatic-ubiquity, only-ubiquity, and debug-ubiquity modes. * ubiquity-hooks/30accessibility: Remove unneeded gconf call to disable esd. [ Colin Watson ] * Ensure that the live CD user's Desktop directory is owned by them, not by root (LP: #218576). * Duplicate a chunk of console-setup logic into the keyboard script so that we can deal with non-Latin keymaps and the like without having to have gfxboot-theme-ubuntu help us; the previous approach broke other uses of console-setup, and thus the alternate install CD (LP: #218754). This should later be replaced by just running console-setup, and I'll open another bug for this. -- Colin Watson Mon, 21 Apr 2008 14:52:05 +0100 casper (1.130) hardy; urgency=low * Handle use of debian-installer/language for locale selection (LP: #213930). -- Colin Watson Sat, 12 Apr 2008 00:30:10 +0100 casper (1.129) hardy; urgency=low * Add COPYING file with GPL text (LP: #211923). * Add casper-new-uuid script to simplify UUID regeneration process, contributed by Mario Limonciello of Dell (LP: #209847). * Update casper-snapshot for genext2fs --reserved-blocks => --reserved-percentage option change (LP: #202048). Add a Breaks as the most lightweight available method of documenting that we need genext2fs >= 1.4.1 for this. -- Colin Watson Thu, 10 Apr 2008 01:45:47 +0100 casper (1.128) hardy; urgency=low [ Luke Yelavich ] * scripts/casper-bottom/30accessibility & ubiquity-hooks/30accessibility: - Update gconf keys to ensure onboard actually gets loaded. - Change ownership of created orca settings files to the user. - Add extra bits to make orca settings actually work. [ Evan Dandrea ] * Add mode=755 to the tmpfs mount that becomes / in the unionfs mount so that / in the live filesystem does not end up with 777 permissions (LP: #206030). [ Colin Watson ] * Make scripts/casper-bottom/38disable_restricted_manager executable again. * Depend on uuid-runtime for uuidgen. -- Colin Watson Mon, 31 Mar 2008 18:11:55 +0100 casper (1.127) hardy; urgency=low * Leave spawning the noninteractive ubiquity frontend to its initscript. -- Evan Dandrea Tue, 25 Mar 2008 15:52:32 -0400 casper (1.126) hardy; urgency=low * scripts/casper-bottom/10adduser: Test for konqueror not kdesktop, stops putting a broken icon on the Kubuntu KDE 4 desktop -- Jonathan Riddell Tue, 25 Mar 2008 15:42:31 +0000 casper (1.125) hardy; urgency=low [ Colin Watson ] * Stop quoting Exec arguments in .desktop files. Apparently this used to work but now the system conforms more strictly to the desktop entry specification (LP: #204185). [ Jonathan Riddell ] * scripts/casper-bottom/15autologin: Enable auto-login for KDM-KDE4 -- Jonathan Riddell Thu, 20 Mar 2008 10:20:17 +0000 casper (1.124) hardy; urgency=low [ Colin Watson ] * Name generated snapshot images according to their type (LP: #202699). [ Martin Pitt ] * scripts/casper-bottom/44pk_allow_ubuntu: Remove erroneous blank line at the start of PolicyKit.conf, since this is invalid XML. This broke PolicyKit completely on the live system. -- Martin Pitt Tue, 18 Mar 2008 10:20:08 +0100 casper (1.123) hardy; urgency=low * Add scripts/casper-bottom/44pk_allow_ubuntu: Allow PolicyKit privileges without password to the default live session user. This avoids the need to press Enter at the password prompt, which is quite confusing. Thanks to MarioDebian! (LP: #201852) -- Martin Pitt Fri, 14 Mar 2008 17:26:37 +0100 casper (1.122) hardy; urgency=low * Fix paths in About Kubuntu links -- Jonathan Riddell Fri, 14 Mar 2008 15:12:38 +0000 casper (1.121) hardy; urgency=low * Use a link for About Kubuntu docs in Kubuntu-KDE4 -- Jonathan Riddell Wed, 12 Mar 2008 23:57:50 +0000 casper (1.120) hardy; urgency=low * Use dhclient directly instead of ifupdown for the url= kernel cmdline argument so that we don't have to worry about the interfaces file propagating to the installed system. -- Evan Dandrea Tue, 11 Mar 2008 13:08:08 -0400 casper (1.119) hardy; urgency=low [ Luke Yelavich ] * scripts/casper-bottom/30accessibility & ubiquity-hooks/30accessibility: - Disable compiz for screen reader and braille terminal accessibility profiles. It is currently not possible to get feedback about open windows when cycling through them using ALT + Tab with Compiz. * ubiquity-hooks/30accessibility: Add braille terminal profile. [ Colin Watson ] * Always set language in both /etc/default/locale and /etc/environment (thanks, Sebastien Bacher). -- Colin Watson Mon, 03 Mar 2008 10:21:42 +0000 casper (1.118) hardy; urgency=low [ Julian Andres Klode, Colin Watson ] * Use aufs instead of unionfs if union=aufs is given (LP: #187259). -- Colin Watson Thu, 14 Feb 2008 18:00:36 +0000 casper (1.117) hardy; urgency=low * Disable speech for magnifier and braille profiles again. Thanks Luke Yelavich. * esd is enabled by default, so the comment in 30accessibility is no longer relevant. -- Evan Dandrea Wed, 13 Feb 2008 01:20:22 -0500 casper (1.116) hardy; urgency=low * Fix setting orca options in 30accessibility. * Remove gdm and kdm from init when using automatic-ubiquity and only-ubiquity. The ubiquity initscript will take care of spawning these. -- Evan Dandrea Mon, 11 Feb 2008 12:19:39 -0500 casper (1.115) hardy; urgency=low * Add the user to the groups specified by user-setup-udeb. -- Evan Dandrea Thu, 24 Jan 2008 19:08:33 +0000 casper (1.114) hardy; urgency=low [ Colin Watson ] * casper-md5check: Close md5_file before exiting. * Disable tracker-applet as well as trackerd, otherwise the former starts the latter. * casper-snapshot: Fix argument parsing (thanks, Tormod Volden; LP: #179411). -- Colin Watson Tue, 15 Jan 2008 18:25:21 +0000 casper (1.113) hardy; urgency=low [ Tollef Fog Heen ] * dpkg-divert away update-initramfs as it's useless on live CDs and annoying when people install LVM and similar tools in order to rescue a system. LP: #150188 [ Colin Watson ] * Adjust /etc/sudoers editing code so that it doesn't repeatedly add "NOPASSWD:" in persistent mode (LP: #175159). * Avoid ejecting the CD if booting from an ISO image rather than from a physical CD (thanks, Agostino Russo; LP: #176014). -- Colin Watson Wed, 19 Dec 2007 09:17:50 +0000 casper (1.112) hardy; urgency=low * hooks/casper: no need to copy udevinfo into the initramfs, it's already there inside udevadm * scripts/casper: call udevadm with trigger and settle arguments * scripts/casper-bottom/23networking: call udevadm with trigger and settle arguments * scripts/casper-helpers: call udevadm with info and settle arguments -- Scott James Remnant Fri, 14 Dec 2007 15:00:29 +0000 casper (1.111) hardy; urgency=low * Remove code to set the progress bar to throbbing, this now comes as standard so we don't need to duplicate it or override things that attempted to set progress. LP: #162397. -- Scott James Remnant Tue, 13 Nov 2007 20:49:31 +0000 casper (1.110) gutsy; urgency=low * Don't generate fglrx or the nvidia modules in the live session at boot; we disable restricted-manager in the live session anyway so they aren't straightforward to use (see #43706). Saves about 19 MB of memory. -- Colin Watson Fri, 05 Oct 2007 21:28:29 +0100 casper (1.109) gutsy; urgency=low * Cache the stty binary before ejecting the CD. * Skip the CD eject prompt if 'noprompt' is on the kernel command line (LP: #149159). * Try each of (e.g.) 2.6.22-13-generic, 2.6.22-13, and 2.6.22 in turn as directory names for driver updates (LP: #122430). -- Colin Watson Fri, 05 Oct 2007 03:24:43 +0100 casper (1.108) gutsy; urgency=low * If CASPER_GENERATE_UUID is set, generate a random UUID in the initramfs, and check it against the discovered medium (unless booting with the ignore_uuid parameter). This allows live CD images to be safely copied to the hard disk without causing problems when booting future live CDs (LP: #144800). -- Colin Watson Thu, 04 Oct 2007 14:23:37 +0100 casper (1.107) gutsy; urgency=low * Fix gconf keys for suspend and hibernate (thanks, Oliver Grawert; LP: #144790). * Enable suspend again since as far as I can see we no longer need to probe DMI while figuring out whether to enable it (see #61535). * Add a 'textonly' boot option to disable X (LP: #65818). * Write the please-remove-CD message to /dev/console so that it works even if usplash isn't running, and make sure to set /dev/console into a sane state so that pressing Enter doesn't just result in ^M being displayed. -- Colin Watson Tue, 02 Oct 2007 15:12:57 +0100 casper (1.106) gutsy; urgency=low * Support preseed/early_command; code supplied here will be run using 'sh -c' from casper-bottom, and can chroot to /root if needed (LP: #144845). * Make sure we don't accidentally continue to boot if casper-md5check fails (LP: #82856). * Clear out debconf database backup files after preseeding to save memory (LP: #43706). * Mount everything as noatime to avoid unnecessary metadata writes. -- Colin Watson Fri, 28 Sep 2007 15:27:52 +0100 casper (1.105) gutsy; urgency=low * scripts/casper-bottom/36disable_trackerd: Disable trackerd in the live session; it's not very useful in this context and it uses a fair bit of memory. -- Colin Watson Mon, 24 Sep 2007 17:25:50 +0100 casper (1.104) gutsy; urgency=low * casper-md5check: Fall back to text output if opening the usplash FIFO fails (LP: #131209). -- Colin Watson Thu, 20 Sep 2007 01:07:45 +0100 casper (1.103) gutsy; urgency=low * Disable anacron harder so that it doesn't get started by battery events. * Don't write out DHCP network interface stanzas if network-manager is installed (LP: #139403). -- Colin Watson Wed, 19 Sep 2007 12:52:21 +0100 casper (1.102) gutsy; urgency=low * Rename 42disable_cups_apparmor to 42disable_apparmor and remove AppArmor's rc.d startup links instead of just disabling the cups profile. AA profiles will not generally work on the live system, so disabling it completely allows us to ship more profiles without worrying any further. (LP: #131976) -- Martin Pitt Fri, 14 Sep 2007 08:37:50 +0200 casper (1.101) gutsy; urgency=low * Add scripts/casper-bottom/42disable_cups_apparmor: Disable AppArmor protection for cups on the live CD by switching the profiles to complain mode. This is necessary until AppArmor works properly on stacked file systems. (LP: #131976) -- Martin Pitt Wed, 12 Sep 2007 16:44:02 +0200 casper (1.100) gutsy; urgency=low * scripts/casper-bottom/41apt_cdrom: Remove unnecessary /root/cdrom mounting/unmounting code, which only serves to generate error messages (scripts/casper-bottom/05mountpoints handles this already). -- Colin Watson Tue, 11 Sep 2007 19:47:58 +0100 casper (1.99) gutsy; urgency=low [ Luke Yelavich ] * scripts/casper-bottom/30accessibility & ubiquity-hooks/30accessibility: - Change gconf setting used to automatically start Orca (LP: #131808). -- Colin Watson Fri, 31 Aug 2007 13:09:46 +0100 casper (1.98) gutsy; urgency=low * Load /preseed.cfg if it exists in the initramfs. -- Colin Watson Wed, 29 Aug 2007 16:18:27 +0100 casper (1.97) gutsy; urgency=low * Fix paths in scripts/casper-bottom/10adduser and scripts/casper-bottom/38disable_restricted_manager -- Jonathan Riddell Wed, 29 Aug 2007 15:26:33 +0100 casper (1.96) gutsy; urgency=low [ Colin Watson ] * Fix name and executability of timezone script. [ Jonathan Riddell ] * In 10adduser add About Kubuntu document to desktop and remove restricted-manager autostart files -- Colin Watson Tue, 07 Aug 2007 12:51:02 +0100 casper (1.95) gutsy; urgency=low * Fix regex syntax error while looking for non-CD devices for driver updates. * Fix ip= boot parameter, documented but not properly merged from Debian (LP: #128689). -- Colin Watson Fri, 27 Jul 2007 15:03:41 +0100 casper (1.94) gutsy; urgency=low [ Colin Watson ] * Hack around keyboard configuration not being done until after the keymap is set by having /etc/init.d/usplash reconfigure the console (LP: #68487). * Disable pam_lastlog on the console if doing autologin (LP: #126800). [ Luke Yelavich ] * scripts/casper-bottom/30accessibility & ubiquity-hooks/30accessibility: - Prevent gksu from grabbing keyboard focus for the v2, v3, and m1 accessibility profiles. (LP: #67172) * Start Orca when a Braille device is configured from choosing the Braille option in the Accessibility menu. (Partially fixes Launchpad bug #122024) * Re-enable desktop sounds for the blindness accessibility profile, as eSpeak should be able to speak alongside audio playback. -- Colin Watson Tue, 24 Jul 2007 16:24:55 +0100 casper (1.93) gutsy; urgency=low * revert gdm-cdd.conf handling for autologin to the chrooted code as we had it in feisty. not chrooting brings up problems with the alternatives system (dead symlinks) used for gdm-cdd.conf -- Oliver Grawert Wed, 18 Jul 2007 15:08:16 +0200 casper (1.92) gutsy; urgency=low [ Colin Watson ] * Don't bother chrooting just to run test(1). [ Evan Dandrea ] * Added support for URL-based preseeding. * Added 'noninteractive' option that starts ubiquity in noninteractive mode on tty1. -- Colin Watson Mon, 09 Jul 2007 15:23:51 +0100 casper (1.91) gutsy; urgency=low * Fix Maintainer field (ubuntu-devel-discuss, not ubuntu-devel). * Remember to strip directories from paths when dealing with driver update .debs (LP: #120217). -- Colin Watson Thu, 14 Jun 2007 09:51:33 +0100 casper (1.90) gutsy; urgency=low * Added to 22screensaver, to stop the screen automatically locking. Fixes LP: #13497 for kubuntu as well. -- Sarah Hobbs Thu, 07 Jun 2007 00:50:42 +1000 casper (1.89) UNRELEASED; urgency=low * Update Maintainer field to reflect reality; this package is no longer maintained by me. -- Tollef Fog Heen Wed, 06 Jun 2007 14:56:46 +0200 casper (1.88) gutsy; urgency=low * Add default values for root_persistence, home_persistence, root_snapshot_label, and home_snapshot_label, and parse the persistent command-line option, which went missing in the last merge from Debian. This goes some way towards LP #84591 but doesn't quite fix it for me since the USB stick inexplicably doesn't appear until a little too late. * Use 'losetup -f' instead of walking /sys/block/loop*. Requires busybox-initramfs 1:1.1.3-4ubuntu3. * Install temporary workaround for /dev/loop* breakage in post-2.6.21 kernels (LP: #118561). -- Colin Watson Mon, 04 Jun 2007 16:26:59 +0100 casper (1.87) feisty; urgency=low [ Colin Watson ] * Improve language at end of MD5 check (LP: #100088). [ Martin Pitt ] * Add casper-bottom/33enable_apport_crashes: Enable apport crash notifications. They are disabled now by default in the installed system for the final release. -- Martin Pitt Mon, 9 Apr 2007 14:31:50 +0200 casper (1.86) feisty; urgency=low [ Luke Yelavich ] * scripts/casper-bottom/30accessibility & ubiquity-hooks/30accessibility: - Point to new settings file for gnome-orca, as package was changed from python-support to pycentral. (LP: #91868) -- Colin Watson Thu, 5 Apr 2007 16:42:54 +0100 casper (1.85) feisty; urgency=low * Stop disabling nvidia and fglrx drivers. LP: #94359 -- Tollef Fog Heen Mon, 2 Apr 2007 13:16:46 +0200 casper (1.84) feisty; urgency=low [ Jani Monoses ] * scripts/casper-bottom/13swap: Call /bin/dd not dd so it correctly detects and uses existing swap partitions (LP: #62868) [ Tollef Fog Heen ] * Make sure that we are settled before trying to set up netbooting. (LP: #96076) * Bind-mount /dev too, when configuring X, this should make it easier for X to be correctly configured on a lot of systems. * Add /root/lib and /root/usr/lib to /etc/ld.so.conf in the initramfs. * Add any sources on the CD to APT using apt-cdrom. * Set the time zone to UTC. LP: #13782 * Fix deletion of checkroot script. LP: #66585. [ Colin Watson ] * Fix error message if do_netmount fails (LP: #95134). -- Tollef Fog Heen Fri, 30 Mar 2007 12:37:58 +0200 casper (1.83) feisty; urgency=low * Fix usplash version in Conflicts. * Add XS-Vcs-Bzr field to debian/control. * scripts/casper-bottom/25configure_init: Support for "respawn COMMAND" has been dropped from upstart jobs; cope with /etc/event.d/tty* using "respawn" plus "exec COMMAND" now instead (LP: #92928). -- Colin Watson Mon, 19 Mar 2007 16:44:22 +0000 casper (1.82) feisty; urgency=low [ Ben Collins ] * Depends on eject package, and copy it into initramfs. * Add log_wait_msg function to use usplash_write INPUTENTER. * Conflict with usplash older than the one that fixes INPUTENTER. * Add driver-updates hooks. [ Colin Watson ] * Fix more leftover /live_media wreckage (LP: #84592). * Add a ubiquity hook to install driver-updates on the target system. -- Colin Watson Mon, 5 Mar 2007 11:19:48 +0000 casper (1.81) feisty; urgency=low * Merge in Debian's changes. -- Tollef Fog Heen Wed, 7 Feb 2007 14:39:30 +0100 casper (1.80) feisty; urgency=low * scripts/casper-bottom/31disable_update_notifier: Allow update-notifier to run for crash report handling, but disable its apt-check hook. -- Colin Watson Thu, 1 Feb 2007 00:11:06 +0000 casper (1.79) feisty; urgency=low [ Colin Watson ] * ubiquity-hooks/30accessibility: Change /root to /target in kderc_addtoprefixes (thanks, Jani Monoses). * Call udevsettle after udevtrigger (thanks, Matthias Urlichs; LP: #77438). * Send casper-reconfigure error messages to stderr rather than stdout to avoid interfering with debconf. [ Jani Monoses ] * ubiquity-hooks/30accessibility, scripts/casper-bottom/30accessibility: Fix v2 option to start orca in magnifier not speech mode. Add v1, v2, v3, m1 and m2 Xubuntu options [ Tollef Fog Heen ] * Apply patch from Luka Renko to support kde-guidance-powermanager and ksmserver instead of klaptoprc as the latter is no longer used. -- Tollef Fog Heen Wed, 10 Jan 2007 20:37:30 +0100 casper (1.78) edgy; urgency=low * Mount the first squashfs as /rofs. Breaks showmounts and won't work properly with stacked filesystems, but works around a kernel oops with multiply-mounted squashfses for Edgy. -- Colin Watson Wed, 25 Oct 2006 12:46:05 +0100 casper (1.77+debian-6) unstable; urgency=medium * Improved snapshots features (even still experimental). * Added "live-media-offset=BYTES" boot param, to enable "hiding" feature, thanks to Sebastien Raveau . * Now it creates /etc/resolv.conf if netbooted. -- Marco Amadori Fri, 1 Dec 2006 17:43:30 +0100 casper (1.77+debian-5) unstable; urgency=low * Fixed preseeding locale and keyboard's variant and options. * Reorganized scans of /proc/cmdline. * Improved manpages, thanks to Oliver Osburg for syntax corrections. * Added "nopersistent" boot option to disable the "persistent" boot param. * Added "xdebconf" boot option, that uses xdebconfigurator on the rootfs to configure X (experimental). -- Marco Amadori Mon, 20 Nov 2006 22:12:18 +0100 casper (1.77+debian-4) unstable; urgency=medium * Removed -phigh from casper-reconfigure, not needed anymore. * Fixed netboot /etc/network/interfaces generation, thanks to Hadar . * Fixed X keyboard setup. Thanks to for the idea. * Fixed keyboard setup. * Allow commandline-device to show up late, thanks to Bas Wijnen for the code and the care (Closes: #397320). * Urgency is set to medium to try reaching Etch with important features/bugfixes. -- Marco Amadori Mon, 6 Nov 2006 19:00:29 +0100 casper (1.77+debian-3) unstable; urgency=medium * Fixed "todisk=" parsing. * Urgency is set to medium to try reaching Etch with important features/bugfixes. -- Marco Amadori Wed, 1 Nov 2006 11:15:56 +0100 casper (1.77+debian-2) unstable; urgency=medium [ Marco Amadori ] * Improved snapshotting (but still experimental). * Renamed "host=" boot parameter to "hostname=" and shell variable "HOST" to "HOSTNAME" for consistence, with linux and with username/USERNAME, as requested by many people. * Fixed a "keyb=" typo. * Added dependence on lsb-base (used by init-script and casper-snapshot). * Removed DM support (obsolete). * Changed a bit locale and keyboard handling. * Fixed locale generation. * Urgency is set to medium to try reaching Etch with important features/bugfixes. [ Otavio Salvador ] * Really lowered usplash conflicts since Debian doesn't has 0.4. -- Marco Amadori Mon, 30 Oct 2006 17:06:48 +0100 casper (1.77+debian-1) unstable; urgency=low * New upstream release. * Added snapshot persistence feature (copy on boot, sync on reboot) via different ways: squashfs, cpio.gz, and block device filesystems. * Added boot parameter "live-media=" to force trying to boot from a specified device. * Added support for "todisk=" to copy the live media to a device filesystem, subsequent boots could use "live-media=". * Slightly polished locales and keyboards handling. * Extendend manpages. * Readded a missing "sleep 1", reworked how live_media is detected, thanks to Bas Wijnen for the reports. (Closes: #394308, #394554). * Reworked casper-getty system, thanks to Alex Owen (Closes: #394686). * Postint now rebuild all initramfs. * Casper now Recommends also squashfs-tools and genext2fs, maybe needed by casper-snapshot. * Lowered usplash requirements, since usplash 0.4 is not in debian yet. -- Marco Amadori Sun, 22 Oct 2006 20:25:38 +0200 casper (1.77) edgy; urgency=low * Honour console-setup/modelcode preseeding. Needed for Malone #66719, #66774. -- Colin Watson Fri, 20 Oct 2006 19:59:39 +0100 casper (1.76) edgy; urgency=low [ Colin Watson ] * Copy access=m2 accessibility changes into the corresponding ubiquity hook. * Remove spurious quoting from accessibility script. * Clear console-setup/layoutcode and console-setup/variantcode if they aren't supplied on the command line. [ Michael Vogt ] * scripts/casper-bottom/35fix_language_selector: - run fontconfig-voodoo if available to make sure that we have optimal fontconfig settings for the CJK languages (lp: #49334) [ Henrik Nilsen Omma ] * Fix a few accessibility items that were out of date, changing gnopernicus -> orca and gok -> onboard (the gok entry was missing some brackets as well; patch from Malone #58836, closes: Malone #65861). -- Colin Watson Mon, 16 Oct 2006 20:20:15 +0100 casper (1.75) edgy; urgency=low * Turn on accessibility in "Motor Difficulties - pointing devices" which makes onboard start properly. closes: Malone: #65861. -- Tollef Fog Heen Fri, 13 Oct 2006 14:12:10 +0200 casper (1.74) edgy; urgency=low [ Tollef Fog Heen ] * Sync up ubiquity-hooks/30accessibility with scripts/casper-bottom/30accessibility fixing spelling errors and enabling accessibility in KDE. [ Colin Watson ] * Fix check for presence of gconf2 (closes: Malone #58836). -- Colin Watson Wed, 11 Oct 2006 11:18:00 +0100 casper (1.73) edgy; urgency=low * Never run install-keymap or preseed debian-installer/keymap if console-setup is detected, even if console-setup wasn't explicitly preseeded. Contributes to Malone #60067. -- Colin Watson Sat, 7 Oct 2006 01:56:20 +0100 casper (1.72) edgy; urgency=low * Force suspend and hibernate both off, since reconfiguring gnome-power-manager kills usplash here. Fixes Malone: #61535 completely. -- Tollef Fog Heen Fri, 6 Oct 2006 14:22:23 +0200 casper (1.71+debian-1) unstable; urgency=low * New upstream release. * Added experimental casper-snapshot script and manpage. * Tagged for debtags project. -- Marco Amadori Thu, 28 Sep 2006 16:04:54 +0200 casper (1.71) edgy; urgency=low * Use TEXT-URGENT in shutdown script to make sure we display the "please remove disc and press enter" text. Malone: #61533 * Increase usplash timeout since "TIMEOUT 0" no longer means "spin forever". * Don't move-mount all the squashfs-es into / since that confuses mono (and some other apps too). Malone: #62756 * Disable kwallet by default. Malone: #47743 * Add -n to language selector to make it not whine about not-fully-installed langpacks. Malone. #37568 * Override definition of log_end_msg in casper-functions. Make sure all casper-bottom scripts use this. * Pulsate bar in casper-top and casper-bottom. Malone: #61535 -- Tollef Fog Heen Wed, 4 Oct 2006 09:52:06 +0200 casper (1.70) edgy; urgency=low * Check for new file= alias as well as preseed/file= (closes: Malone #63145). -- Colin Watson Wed, 4 Oct 2006 08:59:53 +0100 casper (1.69) edgy; urgency=low [ Tollef Fog Heen ] * Use grep -E in scripts/casper. Malone: #57620 * Fix syntax error in accessibility script [ Colin Watson ] * Run 'sh -n' over everything in build target to avoid future syntax errors. * Fix check for /etc/default/console-setup (closes: Malone #62775). -- Colin Watson Mon, 2 Oct 2006 10:58:19 +0100 casper (1.68+debian-3) unstable; urgency=low * Really add casper manpage (Closes: #389867). * Lintian cleanness reached. -- Marco Amadori Thu, 28 Sep 2006 12:36:29 +0200 casper (1.68+debian-2) unstable; urgency=low * Changed "staticip=" boot param to just "ip=". * Added a manpage for casper. * Lintian cleanings. -- Marco Amadori Tue, 26 Sep 2006 00:45:21 +0200 casper (1.68+debian-1) unstable; urgency=low * New upstream release. * Added static network configuration support. * Fixed gnome-screensaver-lock differences between ubuntu. * username, host, and userfullname are now also settable via kernel parameters. -- Marco Amadori Fri, 8 Sep 2006 11:26:02 +0200 casper (1.68) edgy; urgency=low * Honour console-setup/layoutcode and console-setup/variantcode preseeding (closes: Malone #61573). -- Colin Watson Fri, 22 Sep 2006 16:09:53 +0100 casper (1.67) edgy; urgency=low * Make sure to write xorg.conf md5sum to the installed system, not the live system in ubiquity-hooks/20xconfig * Implement support for setting KDE's accessibility options too, thanks to Jonathan Riddell for the patch. * Use usplash's TEXT-URGENT for important messages when doing md5 checks * Fix flashing of progress bar on 32 bit arches -- Tollef Fog Heen Wed, 23 Aug 2006 14:34:57 +0200 casper (1.66+debian-1) unstable; urgency=low * Added "magic" to make it work seamlessy also on ubuntu systems. * Default user password now "live". -- Marco Amadori Fri, 1 Sep 2006 17:18:07 +0200 casper (1.66) edgy; urgency=low * Fix use of db_get in ubiquity accessibility hook. * Use sudo instead of su to get to the live session user from the initramfs or to the newly-installed user from ubiquity. su's argument handling has changed so that the previous code no longer worked, and su was never all that good for arguments containing spaces anyway. -- Colin Watson Mon, 4 Sep 2006 15:46:55 +0100 casper (1.65+debian-1) unstable; urgency=low * New upstream release. * Re-included ubiquity sources since it is here anyway in diff.gz. * Included remote getty patch from Alex Owen (enable it with "casper-getty" as kernel parameter). -- Marco Amadori Thu, 17 Aug 2006 14:06:10 +0200 casper (1.65) edgy; urgency=low * Update to call udevsettle/udevtrigger instead of udevplug -- Tollef Fog Heen Mon, 21 Aug 2006 19:37:58 +0200 casper (1.64) edgy; urgency=low * Fix moving of squashfs mount points so that /proc/mounts in the installed system refers to them correctly (closes: Malone #55019). As a bonus, this lets us mount them on subdirectories of /casper/ right from the start. * Treat locale= as equivalent to debian-installer/locale= (closes: Malone #53444). * Fix ubiquity-hooks/30accessibility not to use log_end_msg, and to chroot to /target instead of /root (closes: Malone #53277). -- Colin Watson Thu, 3 Aug 2006 14:00:22 +0100 casper (1.63+debian-3) unstable; urgency=low * Really do not try to eject cd if netbooted. * Fixed unionfs ro param in case of nfs netboot (Closes: 383346). -- Marco Amadori Wed, 16 Aug 2006 20:10:11 +0200 casper (1.63+debian-2) unstable; urgency=low * Working netboot support (Closes: #380506). * Polished kernel parameters parsing a bit. -- Marco Amadori Sun, 13 Aug 2006 15:52:14 +0200 casper (1.63+debian-1) unstable; urgency=low [Marco Amadori] * New upstream release. * Fixed upstream changelog. * Really fixed the user password issue, now really "debian". * Reincluded casper-md5ckeck in debian/rules and 05mountpoints in script/casper-bottom. * Rewrote netboot support now will support all types of rootfs file images (not only plain dirs) like cd/dvd one. * Included a fix for USB by Davide Natalini * Included support for plain directory as RO rootfs. * Removed xfs support (not implemented in make-live, maybe useless). [Alex Owen] * Added NFS netboot support (Closes: #380506). * Fixed /etc/inittab editing (Closes: #380488). * Do not try to eject cd if netbooted (Closes: #380502). [Daniel Baumann] * Minor debian/rules reordering. * Changed "Section:" from "admin" to "misc". -- Marco Amadori Sun, 30 Jul 2006 19:10:23 +0200 casper (1.63) edgy; urgency=low [ Tollef Fog Heen ] * Change "Live CD user" to "live session user" in the adduser script. Malone #46882 * Wait for persistent devices for 30 seconds, not 1500. * Make sure that readahead-list is installed before chmod -x'ing it. * Only disable l-r-m and anacron if they are installed. * Make sure laptop-detect is installed before trying to call it. * Do not install init script from the initramfs any more. It should have rc.d links already in the squashfs. * Minor build system fixes. * Only copy devmapper relevant files if devmapper is installed. * Remove ubuntu-specific branding from the default casper. * Install default configuration file and make it end up in the initramfs. * Get rid of CD references and replace with medium or other appropriate terms. * Add stacked file system support [ Marco Amadori ] * Added possibility to set locale on chroot, not only at runtime. * Updated 14locales to latest debian policy. [ Malcolm Gilles ] * USB devices can have ID_PATH with pci-*-usb, too. -- Tollef Fog Heen Tue, 18 Jul 2006 10:20:51 +0200 casper (1.61+debian-2) unstable; urgency=low * Set password for user to 'debian'. -- Daniel Baumann Wed, 19 Jul 2006 20:56:00 +0200 casper (1.61+debian-1) unstable; urgency=low [ Daniel Baumann ] * Rebuild tarball without debian directory. * Using dpatch for upstream modifications. * Added patch for proper GDM autologin from Arnaud Cornet . [ Marco Amadori ] * New upstream release (Resynced with 1.61, bzr 258). * Usb discover patch from Malcom Gilles . -- Marco Amadori Tue, 18 Jul 2006 23:34:59 +0200 casper (1.61) edgy; urgency=low * Move PATH setting to top of casper script to avoid silliness where PATH isn't correctly set. -- Tollef Fog Heen Mon, 17 Jul 2006 12:53:59 +0200 casper (1.60) edgy; urgency=low * Change start symlinks to kill symlinks for anacron, to avoid it being started by invoke-rc.d and similar. * Rearrange source package. * Redo how the init script works and require it to be installed in the live fs. * Bump version number to be higher than Debian's so we don't automatically sync. -- Tollef Fog Heen Wed, 31 May 2006 00:01:40 +0200 casper (1.59+debian-1) unstable; urgency=low [ Daniel Baumann ] * Upload to unstable (Closes: #354539). [ Marco Amadori ] * Added possibility to set locale on chroot, not only at runtime. * Removed "persistent" wait. * Fixed persistence lock and added "homepersistence" boot parameter. * Updated locales handling to latest debian policy. * Cleanups -- Daniel Baumann Thu, 22 Jun 2006 06:21:00 +0200 casper (1.59+debian-0) UNRELEASED; urgency=low * Added "toram" boot parameter. * Extendend fs support to ext2 and xfs file image. * Changed debian-inexistant "-Q" modprobe option with "-q". * Removed ubiquity code. * USERNAME and HOST defaulted to "debian". * Preliminary netboot (cifs) patch by "Jason D. Clinton" * Lowered dependence of dmsetup code (now only Suggests). * Checks for replacing "udevplug" (ubuntu-only) with "udevtrigger". * Reworked xorg and anacron patches from Frederic Lehobey . * scripts/casper-bottom/10adduser: configuring only the $USERNAME for sudo instead of group 'admin'. -- Marco Amadori Fri, 16 Jun 2006 11:01:48 +0200 casper (1.58) dapper; urgency=low * Really rename properly, without dirname. -- Scott James Remnant Tue, 30 May 2006 22:47:04 +0100 casper (1.57) dapper; urgency=low * Rename the anacron rc.d/S* symlinks to K*, instead of removing them. Because otherwise pbbuttonsd decides that starting anacron on the LiveCD would be a clever thing to do. -- Scott James Remnant Wed, 24 May 2006 23:06:04 +0100 casper (1.56) dapper; urgency=low * Hopefully work a bit better when checking DVDs on 32 bit architectures. * Do an explicit read from /dev/console when waiting for keypress after CD/DVD has been ejected. -- Tollef Fog Heen Mon, 22 May 2006 16:43:03 +0200 casper (1.55) dapper; urgency=low * Reconfigure gnome-power-manager when doing live installations. Malone #45654 -- Tollef Fog Heen Mon, 22 May 2006 11:16:46 +0200 casper (1.54) dapper; urgency=low [ Luke Yelavich ] * Set large print fonts for the v1 accessibility profile. Closes Malone #45376. [ Colin Watson ] * Fix preseed/file handling (closes: Malone #43683). -- Tollef Fog Heen Thu, 18 May 2006 19:36:24 +0200 casper (1.53) dapper; urgency=low [ Tollef Fog Heen ] * Disable fglrx and nvidida drivers by default. Somewhat addresses #43706 [ Colin Watson ] * Pass all command-line preseed arguments (other than preseed/file) to /root's debconf db. -- Tollef Fog Heen Sat, 13 May 2006 10:14:36 +0200 casper (1.52) dapper; urgency=low * Export the path in casper-reconfigure so X and friends actually have sbin in their path. -- Tollef Fog Heen Thu, 11 May 2006 21:04:11 +0200 casper (1.51) dapper; urgency=low [ Luke Yelavich ] * casper-bottom/30accessibility: - Removed stale reference to acessx_applet. - Fix some typos for gconf values that had to be set as lists. [ Colin Watson ] * Pass debian-installer/locale to /root's debconf db (closes: Malone #41896). * Identify ourselves as casper when communicating with debconf. * Factor out preseeding code into casper-preseed; this knows that it only needs to register a question if it fails to set it, which saves memory by avoiding debconf having to rewrite templates.dat. * Preseed kbd-chooser/method as well as debian-installer/keymap, so that kbd-chooser run from ubiquity picks up the selected keyboard (closes: Malone #42202). * Use new dpkg-reconfigure --no-reload option (debconf 1.4.72ubuntu6) to avoid needlessly rewriting templates.dat. [ Tollef Fog Heen ] * Add ... to the end of all usplash messages. Malone #43856 * Add maybe_break casper-bottom to allow breaking before running bottom scripts. Malone #43860 * Don't show the name of the live cd user that's added. * Mount COW filesystem if show-cow is present on the kernel command line. Malone #43687 * Disable the Kubuntu update notifier too. Malone #43806 * Disable hibernation and enable sleep where appropriate. Malone #23882 -- Tollef Fog Heen Thu, 11 May 2006 12:11:08 +0200 casper (1.50) dapper; urgency=low [ Luke Yelavich ] * Fixed some typos, and added missing settings to some accessibility profiles, as they were either not working properly, or at all. Malone: #39472, #39473 * Removed the desktop wallpaper, and changed the background colour to gray for the v1 accessibility profile. * Set the whiteglass mouse theme for the v1 accessibility profile. * Moved the gconftool-2 -s flag to individual gct calls, to allow for future use of gconftool-2 flags that are incompatible with -s. [ Daniele Favara ] * Allow custom HOST, USERNAME, USERFULLNAME. Malone: #42118 * Add example file - debian/casper.dir: Add examples dir - debian/casper.conf: Explain briefly how to use new variables - debian/rules: Install casper.conf as example_conf_casper [ Tollef Fog Heen ] * Stylistic changes to Daniele's changes. -- Tollef Fog Heen Tue, 2 May 2006 14:12:31 +0200 casper (1.49) dapper; urgency=low * Also look for hardware named wlan* -- Scott James Remnant Wed, 26 Apr 2006 13:37:13 +0100 casper (1.48) dapper; urgency=low * Write /etc/network/interfaces entries for eth0, eth1, eth2, ath0 and wlan0 if there's no hardware detected for them; as it may be plugged in after boot. -- Scott James Remnant Wed, 26 Apr 2006 12:31:38 +0100 casper (1.47) dapper; urgency=low [ Tollef Fog Heen ] * Turn on debugging of the X config. * Log to a file which gets copied to /var/log/casper.log. Malone: #39895 * Only pick UTF-8 locales. Malone: #40178 * Use correct /root rather than /target for seeing what version of gnome-panel-data is installed. * Make festival (and probably some other apps) happier by using 127.0.1.1 for our ubuntu hostname and 127.0.0.1 just resolves to "localhost". * Make casper-md5check read from tty8 since it wants to get keypresses from the active console (where usplash runs). Malone: #40490. * Copy /etc/modules when installing with ubiquity. Malone: #40311 * /etc/gdm/gdm-cdd.conf can be a symlink. Cope with that. Malone: #40767 [ Colin Watson ] * ubiquity-casper conflicts/replaces espresso-casper. -- Tollef Fog Heen Mon, 24 Apr 2006 09:41:14 +0200 casper (1.46) dapper; urgency=low * Use debian-installer/dummy for preseeding rather than espresso/dummy, since the latter was removed in espresso 0.99.38. * espresso is being renamed to ubiquity. Rename espresso-casper to ubiquity-casper to match. -- Colin Watson Fri, 21 Apr 2006 12:52:48 +0100 casper (1.45) dapper; urgency=low [ Matt Zimmerman ] * [share/shutdown] Disable the usplash timeout and wrap the prompt to two lines [ Tollef Fog Heen ] * Use devmapper for ia64, hppa and sparc. -- Tollef Fog Heen Wed, 19 Apr 2006 11:36:49 +0200 casper (1.44) dapper; urgency=low * Reset the timeout after casper-premount has run so we're sure that the timeout is what we want it to be. Udev seems to change it too. * Remove a few set -x commands to make the boot slightly less verbose. * Fix 10adduser to actually install the correct icons for espresso. -- Tollef Fog Heen Wed, 12 Apr 2006 14:20:53 +0200 casper (1.43) dapper; urgency=low * Copy espresso-kdeui.desktop file to user's desktop Branch at http://kubuntu.org/~jriddell/bzr/casper/trunk/ -- Jonathan Riddell Thu, 13 Apr 2006 15:37:49 +0100 casper (1.42) dapper; urgency=low [ Luke Yelavich ] * casper-bottom/30accessibility: - Removed some settings from accessibility profiles as these are now in the relevant packages. [ Tollef Fog Heen ] * Make sure to call gconftool as the right user. Malone #38408 * Write an entry for / in fstab. Hopefully fixes Malone #34330 * Change gdm-cdd.conf if it exists, not gdm.conf. Malone #37467 * Really disable update-notifier, this time by removing the correct file. -- Tollef Fog Heen Tue, 11 Apr 2006 15:43:24 +0200 casper (1.41) dapper; urgency=low * Don't mkdir then install -D, just install -D (this should prevent ~ubuntu/Desktop being owned by root) -- Tollef Fog Heen Wed, 29 Mar 2006 10:52:42 +0200 casper (1.40) dapper; urgency=low * Add snd_powermac to /etc/modules on ppc. (Malone: #27862) * Use chmod -x instead of mv to disable readahead in order to not trigger unionfs bugs * Reboot the system when a key is pressed at the end of the integrity check. (Malone: #29203) * Use usplash_write too when doing shutdown. (Malone: #34537) -- Tollef Fog Heen Tue, 28 Mar 2006 10:09:49 +0200 casper (1.39) dapper; urgency=low [ Tollef Fog Heen ] * Disable update-notifier by default, as it won't make much sense for most people. [ Colin Watson ] * Clear out user-setup questions from the debconf database after creating the live CD user, to avoid confusing espresso into offering "Ubuntu LiveCD user" as the user's default full name. -- Tollef Fog Heen Mon, 13 Mar 2006 11:38:39 +0100 casper (1.38) dapper; urgency=low * Disable readahead since it breaks too much with squashfs and unionfs. -- Tollef Fog Heen Thu, 9 Mar 2006 09:43:39 +0100 casper (1.37) dapper; urgency=low * Add support for having the squashfs directly on a device, thanks to Paul Sladen for idea and a patch. * If a directory "Examples" exists in ~ after we've run adduser, move it to the Desktop subdirectory for greater visibility. -- Tollef Fog Heen Sat, 4 Mar 2006 11:55:50 +0100 casper (1.36) dapper; urgency=low [ Tollef Fog Heen ] * Fix typo in find_cow_device so block devices didn't work at all. Malone #31639. Thanks to Richard Nemec for the catch. * Update accessibility framework, thanks to Luke Yelavich. [ Colin Watson ] * Move the /cdrom mount into the new root filesystem. -- Tollef Fog Heen Wed, 1 Mar 2006 11:13:54 +0100 casper (1.35) dapper; urgency=low * Check for preseed/file= in /proc/cmdline and feed any given file to debconf-set-selections. -- Colin Watson Mon, 27 Feb 2006 17:32:02 +0000 casper (1.34) dapper; urgency=low [ Luke Yelavich ] * Add initial accessibility support framework -- Tollef Fog Heen Wed, 22 Feb 2006 14:36:07 +0100 casper (1.33) dapper; urgency=low * Make sure Desktop and the espresso-$ui.desktop is owned by the Ubuntu user. Malone #31991 * Fix check for rc6.d/S90reboot at the bottom of 25configure_init to actually look in the right place. * Make me the maintainer of the package. -- Tollef Fog Heen Mon, 20 Feb 2006 09:49:02 +0100 casper (1.32) dapper; urgency=low * Fix copying of /usr/share/applications/espresso-gtkui.desktop. -- Colin Watson Thu, 16 Feb 2006 16:47:15 +0000 casper (1.31) dapper; urgency=low [ Tollef Fog Heen ] * Print message about rebooting the system when the md5 check is finished. * Just have one copy of the casper shutdown scripts and symlink those into the right place. Malone #20978 [ Colin Watson ] * Copy /usr/share/applications/espresso-gtkui.desktop to the live CD user's desktop. -- Tollef Fog Heen Tue, 14 Feb 2006 14:52:16 +0100 casper (1.30) dapper; urgency=low * Set a blank password for the ubuntu user. This hopefully resolves Malone #30118 * Pass keyboard layout information to xserver-xorg in the "new" scheme. * Set up the right console keymap. -- Tollef Fog Heen Tue, 14 Feb 2006 14:48:14 +0100 casper (1.29) dapper; urgency=low [ Tollef Fog Heen ] * Fix typo in 22gnome_panel_data * Configure all detected network interfaces. * Add support for putting the persistent storage in a loopback file on vfat volumes * Configure all detected network interfaces. * Allow putting the live filesystem image on a VFAT volume * Allow putting the persistent storage in a loopback file on a VFAT volume * Lots of cleanups [ Colin Watson ] * Change casper-reconfigure to take the target root filesystem as its first argument. * Add espresso-casper package with hooks to repeat some things done by casper in the installed system. -- Tollef Fog Heen Wed, 25 Jan 2006 14:25:45 +0100 casper (1.28) dapper; urgency=low * Depend on user-setup * First shot at IEEE1394 support. Add sbp2 and ohci1394 as modules to be copied into the initramfs. -- Tollef Fog Heen Mon, 16 Jan 2006 22:06:35 +0100 casper (1.27) dapper; urgency=low * Try using unionfs on ppc again -- Tollef Fog Heen Tue, 10 Jan 2006 20:55:19 +0100 casper (1.26) dapper; urgency=low * Add persistency support * Usplash integration -- Tollef Fog Heen Tue, 10 Jan 2006 17:53:54 +0100 casper (1.25) dapper; urgency=low * Make /rofs available to in the target system. -- Tollef Fog Heen Mon, 9 Jan 2006 15:25:12 +0100 casper (1.24) dapper; urgency=low * For debconf-communicate, use a here-doc rather than trying to have \n working in shell variables. * The usplash fifo has moved, update paths accordingly. Also conflict with the old usplash and depend on new enough initramfs-tools. -- Tollef Fog Heen Fri, 6 Jan 2006 14:20:37 +0100 casper (1.23) dapper; urgency=low * Move the building to binary-dep, since we're an arch: any package now. -- Tollef Fog Heen Thu, 5 Jan 2006 10:37:31 +0100 casper (1.22) dapper; urgency=low * Bunch debconf-communicate commands together to speed up the boot a little bit. * Add integrity checker, this is compiled code, so casper is now arch: any -- Tollef Fog Heen Wed, 4 Jan 2006 12:56:13 +0100 casper (1.21) dapper; urgency=low * If locale is unset, use en_US.UTF8, not whatever comes first in the list of supported locales. * Generate locale and set the locale in /etc/environment * Use user-setup to create the user, rather than doing it ourselves. * Various cleanups and fixes, such as making debconf-communicate silent * Disable checkroot when booting -- Tollef Fog Heen Mon, 2 Jan 2006 11:00:25 +0100 casper (1.20) dapper; urgency=low * Remove a large bunch of debugging output * Depend on dmsetup so the hook script can copy in that * Handle both squashfs and cloop images, with run-time detection * Use devmapper + cloop on powerpc, not unionfs, since unionfs is a disaster there. * Make sure we have both SCSI and IDE CDROM modules available in the initramfs. * Do some initial keyboard setup handling so X will, at least in some cases, have a chance of giving the user a sane keymap. -- Tollef Fog Heen Mon, 19 Dec 2005 14:23:13 +0100 casper (1.19) dapper; urgency=low * Switch to initramfs, so casper only survives in spirit * Use unionfs instead of a writeable devmapper snapshot * Remove all debconfiscation, since we're an initramfs script now * Make the postinst call update-initramfs -u * Mount the CD read-only explicitly * Make udevinfo silent if the device is not found. -- Tollef Fog Heen Tue, 13 Dec 2005 16:22:45 +0100 casper (1.18) breezy; urgency=low * Update translations from Rosetta: Greek, Spanish, French, Hungarian, Brazilian Portuguese. -- Colin Watson Mon, 19 Sep 2005 20:05:02 +0100 casper (1.17) breezy; urgency=low * Set /apps/gnome-screensaver/lock if gnome-screensaver is installed -- Matt Zimmerman Fri, 16 Sep 2005 15:24:35 -0700 casper (1.16) breezy; urgency=low * Install a fake script in /lib/debian-installer.d/S72menu-exit after pivoting that just calls sleep, to prevent scary console messages as d-i tries to exit without its root filesystem. -- Colin Watson Wed, 14 Sep 2005 10:28:06 +0100 casper (1.15) breezy; urgency=low * Neutralize branding in startup message * Use clear in addition to reset, in hopes of concealing error messages on the console from d-i's death throes -- Matt Zimmerman Fri, 9 Sep 2005 11:24:14 -0700 casper (1.14) breezy; urgency=low * Set RUNNING_UNDER_GDM=yes in the user's environment to stop xscreensaver locking the screen (Ubuntu #7150). -- Colin Watson Thu, 8 Sep 2005 13:37:00 +0100 casper (1.13) breezy; urgency=low * Use reset, rather than clear, to clean up after the colored dialogs on vt1 -- Matt Zimmerman Wed, 7 Sep 2005 16:09:45 -0700 casper (1.12) breezy; urgency=low * Kill bterm after pivoting so that we can use vt1 rather than vt2, thereby avoiding a fight between gdm and the X server (closes: Ubuntu #14851). -- Colin Watson Wed, 7 Sep 2005 15:48:40 +0100 casper (1.11) breezy; urgency=low * Remove debugging code which crept into 1.10 * Revert changes to casper-udeb.postinst which were intended for starting usplash earlier (pre-1.10) -- Matt Zimmerman Fri, 2 Sep 2005 13:43:03 -0700 casper (1.10) breezy; urgency=low * Instead of starting usplash directly, create an init script which will start it later (after the new init), to avoid it being killed by busybox init -- Matt Zimmerman Mon, 29 Aug 2005 20:26:58 -0700 casper (1.9) breezy; urgency=low * Remember to re-run 30copy-dev from 94usplash, in order to preserve the device nodes clobbered by udev * Redirect stdin of /etc/init.d/udev from /dev/console, to avoid incredibly obnoxious 60-second sleep because it thinks we're interactive -- Matt Zimmerman Mon, 29 Aug 2005 18:30:38 -0700 casper (1.8) breezy; urgency=low * Add usplash support -- Matt Zimmerman Mon, 29 Aug 2005 17:30:57 -0700 casper (1.7) breezy; urgency=low * Set DEBUG_XORG_PACKAGE=yes when reconfiguring xserver-xorg. The output is only written to post.log and isn't visible to the user, and can be invaluable for debugging -- Matt Zimmerman Mon, 22 Aug 2005 10:25:38 -0700 casper (1.6) breezy; urgency=low * Use debconf-copydb again (thanks, Tollef) * Rename pre.d/20xconfig to pre.d/20prexconfig so that it is distinct from post.d/20xconfig for purposes of the progress bar (no text for it; it's very fast) -- Matt Zimmerman Wed, 17 Aug 2005 14:55:24 -0700 casper (1.5) breezy; urgency=low * Call MAKEDEV console in post.d/20xconfig as a workaround for bug #13523 -- Matt Zimmerman Tue, 16 Aug 2005 15:24:06 -0700 casper (1.4) breezy; urgency=low * Revert to the old debconf hack; the debconf-copydb approach needs more work -- Matt Zimmerman Mon, 15 Aug 2005 22:48:11 -0700 casper (1.3) breezy; urgency=low * Revert unintentional release of experimental unionfs code in 1.2 -- Matt Zimmerman Sat, 13 Aug 2005 11:19:50 -0700 casper (1.2) breezy; urgency=low * Fix debconf-copydb regex in 20xconfig -- Matt Zimmerman Sat, 13 Aug 2005 11:07:46 -0700 casper (1.1) breezy; urgency=low * Cope with xserver-xorg's rename of force_keyboard_detection to autodetect_keyboard -- Matt Zimmerman Mon, 4 Jul 2005 02:52:07 -0700 casper (1.0) breezy; urgency=low * Version number bump (we've been through a stable Ubuntu release, after all) * Rename pre.d/10snapshot to post.d/10filesystem, as it is about to become more generic * Seed xserver-xorg/force_keyboard_detection to true in 20xconfig, so as to cause the keyboard layout to (continue to) be autodetected based on d-i settings -- Matt Zimmerman Thu, 16 Jun 2005 11:21:54 -0700 casper (0.65) breezy; urgency=low * As a performance optimization, only reconfigure gnome-panel-data if booting on a laptop * Disable the "lock screen" menu item (Ubuntu bug#7150) -- Matt Zimmerman Wed, 8 Jun 2005 16:02:14 -0700 casper (0.64) breezy; urgency=low * Merge colin.watson@canonical.com--2005/casper--debconf-copydb--0 - Use debconf-copydb rather than our temporary hack -- Matt Zimmerman Tue, 31 May 2005 12:08:51 -0700 casper (0.63) breezy; urgency=low * Merge colin.watson@canonical.com--2005/casper--cdebconf-info--0 - Update for cdebconf 0.75: use db_info rather than db_x_setbacktitle. -- Matt Zimmerman Mon, 18 Apr 2005 20:59:58 -0700 casper (0.62) hoary; urgency=low * Updated translations from colin.watson@canonical.com--2005/casper--translations--0 (nb) -- Matt Zimmerman Tue, 5 Apr 2005 09:01:02 -0700 casper (0.61) hoary; urgency=low * Updated translations from colin.watson@canonical.com--2005/casper--translations--0 (el, es, ro) -- Matt Zimmerman Tue, 5 Apr 2005 08:06:51 -0700 casper (0.60) hoary; urgency=low * Updated translations from colin.watson@canonical.com--2005/casper--translations--0 (hu, id, pl) -- Matt Zimmerman Mon, 28 Mar 2005 11:26:21 -0800 casper (0.59) hoary; urgency=low * Updated translations from colin.watson@canonical.com--2005/casper--translations--0 (de, pt_BR) -- Matt Zimmerman Fri, 25 Mar 2005 16:51:17 -0800 casper (0.58) hoary; urgency=low * Remove postfix shutdown links, as well as startup, to avoid an ugly error -- Matt Zimmerman Thu, 24 Mar 2005 18:24:03 -0800 casper (0.57) hoary; urgency=low * Merge colin.watson@canonical.com--2005/casper--translations--0 up to patch-2 * Preseed netcfg/wireless_essid_again for noninteractive network setup, +new in netcfg 1.08ubuntu3 [colin.watson@canonical.com--2005/casper--netcfg--0] -- Matt Zimmerman Wed, 23 Mar 2005 08:33:46 -0800 casper (0.56) hoary; urgency=low * Suppress error output from eject * Remind the user to close the CD tray if they have one (Ubuntu #6668) * Add arch-build target to debian/rules -- Matt Zimmerman Tue, 22 Mar 2005 10:21:41 -0800 casper (0.55) hoary; urgency=low * Remove the hack introduced in 0.54, xorg 6.8.2-5 should be fixed -- Matt Zimmerman Wed, 16 Mar 2005 18:11:05 -0800 casper (0.54) hoary; urgency=low * Temporarily set RECONFIGURE=true when reconfiguring xserver-xorg, to work around a bug introduced in 6.8.2-3 -- Matt Zimmerman Wed, 16 Mar 2005 15:08:45 -0800 casper (0.53) hoary; urgency=low * Provide target-base-system (i.e. base system installed in /target, also provided by base-installer). -- Colin Watson Tue, 15 Mar 2005 13:01:53 +0000 casper (0.52) hoary; urgency=low * Arrange for $LANG to be set after pivot_root, so that (e.g.) xserver-xorg can use it to infer the keymap (Ubuntu #7138) -- Matt Zimmerman Sat, 12 Mar 2005 02:10:59 -0800 casper (0.51) hoary; urgency=low * Disable kpersonalizer startup on first login -- Matt Zimmerman Sat, 5 Mar 2005 13:47:13 -0800 casper (0.50) hoary; urgency=low * Add support for configuring kdm autologin * Rename 15gdm-autologin to 15autologin, and the corresponding debconf template * Remove obsolete XORG_FORCE_PROBE from 20xconfig -- Matt Zimmerman Thu, 3 Mar 2005 10:37:31 -0800 casper (0.49) hoary; urgency=low * Fix 20xconfig harder -- Matt Zimmerman Wed, 2 Mar 2005 21:20:03 -0800 casper (0.48) hoary; urgency=low * Source confmodule in 20xconfig -- Matt Zimmerman Wed, 2 Mar 2005 21:02:35 -0800 casper (0.47) hoary; urgency=low * Copy over the value of debian-installer/keymap into the target system, to allow the new logic in xserver-xorg.config to work -- Matt Zimmerman Wed, 2 Mar 2005 20:45:38 -0800 casper (0.46) hoary; urgency=low * Lock the live user's password entirely. Since the user is now automagically logged in, continuously, both on the console and in X, their password is irrelevant. -- Matt Zimmerman Mon, 28 Feb 2005 08:31:13 -0800 casper (0.45) hoary; urgency=low * Enable TimedLogin in gdm, so that if the user logs out, they are automatically logged back in after a few seconds (Ubuntu #6667) -- Matt Zimmerman Sun, 27 Feb 2005 16:06:16 -0800 casper (0.44) hoary; urgency=low * Configure init to spawn shells on virtual consoles, rather than login prompts (Ubuntu #6666) * Skip X configuration if a serial console is in use * Set the live user's password to be blank, rather than "ubuntu". This is, paradoxically, more secure if the user decides to install openssh-server, since empty passwords are disallowed by default -- Matt Zimmerman Sun, 27 Feb 2005 15:40:15 -0800 casper (0.43) hoary; urgency=low * Override localechooser progress bar text to be more appropriate for the live CD (closes: Ubuntu #6664). -- Colin Watson Thu, 24 Feb 2005 19:12:00 +0000 casper (0.42) hoary; urgency=low * Preseed netcfg/no_interfaces, to avoid prompt when no network interfaces can be configured (closes: Ubuntu #6107). * Remove redundant DH_COMPAT setting in debian/rules, since there's already a (different) debian/compat. -- Colin Watson Tue, 22 Feb 2005 12:43:43 +0000 casper (0.41) hoary; urgency=low * Cope with change in default /etc/sudoers (admin group). -- Colin Watson Tue, 22 Feb 2005 09:14:30 +0000 casper (0.40) hoary; urgency=low * Copy /dev/tts to the live system as well as /dev/vc, for serial console. -- Colin Watson Mon, 21 Feb 2005 19:03:54 +0000 casper (0.39) hoary; urgency=low * Fix reboot operation (cache the reboot binary) -- Matt Zimmerman Thu, 10 Feb 2005 20:51:08 -0800 casper (0.38) hoary; urgency=low * Eject the CD during shutdown/reboot - Awful hack to copy /dev/cdroms to the live system, because the CD is mounted using devfs names - Add /usr/share/casper/shutdown script to casper-udeb - Copy /usr/share/casper/shutdown to /etc/rc[06].d in 25configure-init * Remove caspermon binary package, inadvertently enabled (not even remotely ready) -- Matt Zimmerman Thu, 10 Feb 2005 13:43:56 -0800 casper (0.37) hoary; urgency=low * Fix casper-udeb/runlevel template -- Matt Zimmerman Tue, 8 Feb 2005 19:37:43 -0800 casper (0.36) hoary; urgency=low * Rename post.d/25disable-init-scripts to 25configure-init * Add casper-udeb/runlevel, to allow the default runlevel to be set -- Matt Zimmerman Tue, 8 Feb 2005 19:14:16 -0800 casper (0.35) hoary; urgency=low * Preseed netcfg/wireless_essid * Remove obsolete confmodule load from pre.d/12fstab * Don't mount a tmpfs on /var/run; it doesn't save a huge amount of snapshot space, and packages expect their directories there to be persistent -- Matt Zimmerman Mon, 7 Feb 2005 15:46:52 -0800 casper (0.34) hoary; urgency=low * Use casper-reconfigure in 10adduser as well * Add post.d/93save-logs to save copies of the bootstrap logs to /var/log/casper * Stop reconfiguring fontconfig; it insists on rebuilding the entire font cache, and the only benefit was to unable subpixel hints -- Matt Zimmerman Wed, 2 Feb 2005 10:42:19 -0800 casper (0.33) hoary; urgency=low * Re-upload to fix borked source package -- Matt Zimmerman Sun, 30 Jan 2005 12:21:07 -0800 casper (0.32) hoary; urgency=low * Factor out debconf hackery into casper-reconfigure * Mount sysfs earlier, so we don't need to mess with it in 20xconfig * Break 22simple-reconfig into 22fontconfig and 22gnome-panel-data, and create progress bar text for them * Preseed netcfg/dhcp_failed, to avoid a prompt when DHCP fails -- Matt Zimmerman Sat, 29 Jan 2005 14:03:36 -0800 casper (0.31) hoary; urgency=low * Clear tty2 and print a nice message, before signalling init -- Matt Zimmerman Sat, 29 Jan 2005 13:15:44 -0800 casper (0.30) hoary; urgency=low * Reconfigure fontconfig, to enable subpixel rendering based on the hardware in use -- Matt Zimmerman Thu, 27 Jan 2005 14:21:49 -0800 casper (0.29) hoary; urgency=low * Fix the problem described in 0.28 by preseeding a default for netcfg/get_hostname -- Matt Zimmerman Tue, 25 Jan 2005 23:04:03 -0800 casper (0.28) hoary; urgency=low * Suppress network configuration questions - The goal is to make a reasonable effort to configure one interface automatically, but if that is not possible, fall back to no configuration. We aren't quite there yet. - If we fail to resolve our IP into a hostname using DNS, netcfg seems to fall back to an empty value, rather than the default in the template. -- Matt Zimmerman Tue, 25 Jan 2005 22:55:35 -0800 casper (0.27) hoary; urgency=low * Add post.d/22simple-reconfig - Reconfigure gnome-panel-data if it is installed, to set up the GNOME session based on whether the system is a laptop - Corresponding progress template - mount /proc earlier (needed for, e.g. laptop-detect) * Warn about screen blanking in X configuration progress message * Simplify post.d/20xconfig and pre.d/13swap a bit * Update TODO -- Matt Zimmerman Sat, 22 Jan 2005 15:56:49 -0800 casper (0.26) hoary; urgency=low * Set NOPASSWD in /etc/sudoers for the initial user -- Matt Zimmerman Fri, 21 Jan 2005 16:53:49 -0800 casper (0.25) hoary; urgency=low * mount /proc before signalling init, as it now uses /proc to determine what is and is not a kernel thread -- Matt Zimmerman Fri, 21 Jan 2005 16:04:52 -0800 casper (0.24) hoary; urgency=low * Add a backtitle properly -- Matt Zimmerman Fri, 21 Jan 2005 09:07:19 -0800 casper (0.23) hoary; urgency=low * Add a backtitle -- Matt Zimmerman Fri, 21 Jan 2005 09:02:01 -0800 casper (0.22) hoary; urgency=low * Search for swap on SCSI disks as well as IDE -- Matt Zimmerman Wed, 19 Jan 2005 14:27:09 -0800 casper (0.21) unstable; urgency=low * Cosmetic changes to debconf templates * Fix 10adduser to register debconf questions before setting their values and flags -- Matt Zimmerman Wed, 19 Jan 2005 14:14:20 -0800 casper (0.20) hoary; urgency=low * Remove legacy symlinks from casper/pre.d; they are now contained in the relevant udebs -- Matt Zimmerman Wed, 19 Jan 2005 13:22:33 -0800 casper (0.19) hoary; urgency=low * Update TODO * casper-udeb Depends: md-modules -- Matt Zimmerman Wed, 19 Jan 2005 11:23:51 -0800 casper (0.18) hoary; urgency=low * Enable new adduser code, using db_fset ... seen to suppress the questions -- Matt Zimmerman Tue, 18 Jan 2005 15:06:48 -0800 casper (0.17) hoary; urgency=low * Convert snapshot setup to use debconf instead of hardcoded parameters * Remove obselete-before-being-used username template * Convert post.d/10adduser to use debconf passthrough to the passwd package, and thus share its user-adding code rather than duplicating it. - But don't enable it yet, since we need to find a way to prevent its questions from being asked -- Matt Zimmerman Tue, 18 Jan 2005 13:04:48 -0800 casper (0.16) hoary; urgency=low * casper-udeb Depends: casper-check, harddrive-detection * Automatically find and enable swap devices -- Matt Zimmerman Tue, 18 Jan 2005 11:23:48 -0800 casper (0.15) hoary; urgency=low * Set anna/standard_modules to false at startup to suppress unnecessary udeb retrieval. -- Colin Watson Tue, 18 Jan 2005 13:41:00 +0000 casper (0.14) hoary; urgency=low * Enable X autoconfiguration(!) -- Matt Zimmerman Sat, 15 Jan 2005 02:19:58 -0800 casper (0.13) hoary; urgency=low * Rename templates so that they are named after the {pre,post}.d hook which uses them * Remove some unused templates -- Matt Zimmerman Fri, 14 Jan 2005 10:11:02 -0800 casper (0.12) hoary; urgency=low * Add debconf templates for various things that we currently hardcode. Not actually used yet due to need for testing, but having the templates present greatly simplifies testing the remaining integration work -- Matt Zimmerman Thu, 13 Jan 2005 20:32:39 -0800 casper (0.11) hoary; urgency=low * Update post.d/20xconfig to use debconf passthrough to cdebconf (requires debconf 1.4.42 and cdebconf 0.75), but leave it disabled for now * Create /etc/fstab in the target (this also seems to solve the problem with noatime disappearing, and so should reduce snapshot utilization) -- Matt Zimmerman Thu, 13 Jan 2005 18:25:36 -0800 casper (0.10) hoary; urgency=low * Remove rc?.d/K??hwclock.sh links, to avoid changing the system clock during reboot or shutdown -- Matt Zimmerman Thu, 13 Jan 2005 18:13:31 -0800 casper (0.9) hoary; urgency=low * Fix gdm autologin configuration (broken in 0.8) -- Matt Zimmerman Wed, 12 Jan 2005 10:52:05 -0800 casper (0.8) hoary; urgency=low * Add debian-installer/casper-udeb/title template, to specify more readable menu item text * Create /usr/lib/casper/{pre,post}.d and move all of our internal logic there * Create temporary symlinks in pre.d for the prebaseconfig.d items we want * Convert errors into proper error dialogs * Make some pre.d scripts idempotent, for ease of testing -- Matt Zimmerman Tue, 11 Jan 2005 16:59:35 -0800 casper (0.7) hoary; urgency=low * Disable X configuration temporarily; need to resolve debconf issues -- Matt Zimmerman Tue, 11 Jan 2005 13:14:43 -0800 casper (0.6) hoary; urgency=low * Allow "modprobe ext2" to fail; apparently it's sometimes compiled in -- Matt Zimmerman Tue, 11 Jan 2005 12:12:28 -0800 casper (0.5) hoary; urgency=low * Attempt to configure X - This doesn't work very well yet (PCI BusID doesn't seem to get updated, for example), so we still don't start gdm by default) * Conditionalize some of the configuration code, so we automatically do the right thing if gdm or X isn't installed * Add German translation from Andreas Mueller * modprobe ext2, to let powerpc work (this should probably happen elsewhere, but for now...) -- Matt Zimmerman Sun, 9 Jan 2005 17:49:56 -0800 casper (0.4) hoary; urgency=low * Mount tmpfs on /tmp and /var/run, should save many writes to the snapshot -- Matt Zimmerman Fri, 7 Jan 2005 18:35:26 -0800 casper (0.3) hoary; urgency=low * Disable anacron and postfix startup * Don't cripple /bin/apt-install in d-i (this was a workaround to prevent d-i from installing packages which should have been present in the filesystem image anyway, but weren't) -- Matt Zimmerman Fri, 7 Jan 2005 18:10:55 -0800 casper (0.2) hoary; urgency=low * Use mount --move to move the cdrom mount point, so that we can unmount /initrd and free up the memory used by d-i * Use /dev/ram1 rather than /dev/ram0 for the COW stuff, since /dev/ram0 is used for initrds and we want to avoid confusion * Organize casper-udeb.postinst into shell functions * Add a progress bar * Add a debian/compat file (version 4) -- Matt Zimmerman Fri, 7 Jan 2005 08:01:21 -0800 casper (0.1) hoary; urgency=low * Initial Release. -- Matt Zimmerman Wed, 5 Jan 2005 14:30:28 -0800 casper/debian/compat0000664000000000000000000000000212321311227011635 0ustar 7 casper/debian/rules0000775000000000000000000000116512321311227011522 0ustar #! /usr/bin/make -f DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) %: dh $@ ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) override_dh_auto_build: dh_auto_build -- CC=$(DEB_HOST_GNU_TYPE)-gcc PKG_CONFIG=$(DEB_HOST_GNU_TYPE)-pkg-config endif override_dh_installinit: dh_installinit -r --no-start -- start 89 0 6 . check: # Check the syntax of any shell scripts. set -e; for x in $$(find -type f \! -name \*.po \! -name \*.pot -print0 | xargs -0 file -i | grep "text/x-shellscript" | cut -d':' -f1); do \ sh -n $$x; \ done casper/debian/control0000664000000000000000000000272512321311227012050 0ustar Source: casper Section: misc Priority: optional Maintainer: Ubuntu Developers Build-Depends: debhelper (>= 7.0.50~), lsb-release, libplymouth-dev (>= 0.8.0~-13), pkg-config Standards-Version: 3.9.3 Vcs-Bzr: https://code.launchpad.net/+branch/ubuntu/casper Package: casper Architecture: any Section: misc Priority: extra Depends: ${shlibs:Depends}, ${misc:Depends}, initramfs-tools (>= 0.92bubuntu55), busybox-initramfs (>= 1:1.1.3-4ubuntu3), dmsetup, user-setup, sudo, eject, uuid-runtime, localechooser-data (>= 2.03ubuntu1), util-linux (>= 2.15-1), file, lzma, udev (>= 174), cifs-utils Conflicts: usplash (<< 0.4-43), live-initramfs Breaks: genext2fs (<< 1.4.1) Tag: admin::boot, admin::filesystem, implemented-in::shell, protocol::smb, role::plugin, scope::utility, special::completely-tagged, works-with-format::iso9660 Description: Run a "live" preinstalled system from read-only media Package: ubiquity-casper Architecture: all Depends: laptop-detect, sudo, ${misc:Depends} Enhances: ubiquity Replaces: casper (<< 1.318) Breaks: casper (<< 1.318) Tag: admin::boot, admin::filesystem, implemented-in::shell, protocol::smb, role::plugin, scope::utility, special::completely-tagged, works-with-format::iso9660 Description: Configuration hooks for live installer This package provides hook scripts for the Ubiquity live installer that repeat some pieces of configuration done by the live system boot process in the system installed by Ubiquity. casper/debian/casper.manpages0000664000000000000000000000007112321311227013427 0ustar debian/manpage/casper.7 debian/manpage/casper-snapshot.1 casper/debian/bzr-builddeb.conf0000664000000000000000000000003112321311227013645 0ustar [BUILDDEB] native = True casper/debian/ubiquity-casper.install0000664000000000000000000000015612321311227015157 0ustar bin/casper-a11y-enable usr/bin bin/casper-reconfigure usr/bin ubiquity-hooks/* usr/lib/ubiquity/target-config casper/debian/casper.init0000775000000000000000000001105312321311227012604 0ustar #! /bin/sh ### BEGIN INIT INFO # Provides: casper # Required-Start: $syslog # Required-Stop: # Should-Start: $local_fs # Should-Stop: halt reboot # X-Stop-After: umountroot # Default-Start: # Default-Stop: 0 6 # Short-Description: Casper init script # Description: Resyncs snapshots, evantually caches files in order # to let remove the media. ### END INIT INFO # Author: Tollef Fog Heen # Marco Amadori # PATH=/usr/sbin:/usr/bin:/sbin:/bin NAME=casper SCRIPTNAME=/etc/init.d/${NAME} DO_SNAPSHOT=/sbin/${NAME}-snapshot # Exit if system was not booted by casper grep -qs boot=casper /proc/cmdline || exit 0 # Exit if the system was booted from an ISO image rather than a physical CD grep -qs find_iso= /proc/cmdline && exit 0 # Read configuration variable file if it is present [ -r /etc/$NAME.conf ] && . /etc/$NAME.conf # Load the VERBOSE setting and other rcS variables [ -f /etc/default/rcS ] && . /etc/default/rcS # Define LSB log_* functions. # Depend on lsb-base (>= 3.0-6) to ensure that this file is present. . /lib/lsb/init-functions # Try to cache everything we're likely to need after ejecting. This # is fragile and simple-minded, but our options are limited. cache_path() { path="$1" if [ -d "$path" ]; then find "$path" -type f | xargs cat > /dev/null 2>&1 elif [ -f "$path" ]; then if [ -x "$path" ]; then if file -L "$path" | grep -q 'dynamically linked'; then for lib in $(ldd "$path" | awk '{ print $3 }'); do cache_path "$lib" done fi fi cat "$path" >/dev/null 2>&1 fi } do_stop () { if [ ! -z "${ROOTSNAP}" ]; then $DO_SNAPSHOT --resync-string="${ROOTSNAP}" fi if [ ! -z "${HOMESNAP}" ]; then $DO_SNAPSHOT --resync-string="${HOMESNAP}" fi # check for netboot if [ ! -z "${NETBOOT}" ] || grep -qs netboot /proc/cmdline || grep -qsi root=/dev/nfs /proc/cmdline || grep -qsi root=/dev/cifs /proc/cmdline ; then return 0 fi # Don't prompt to eject the SD card on Babbage board, where we reuse it # as a quasi-boot-floppy. Technically this uses a bit of ubiquity # (archdetect), but since this is mostly only relevant for # installations, who cares ... if type archdetect >/dev/null 2>&1; then subarch="$(archdetect)" case $subarch in arm*/imx51) return 0 ;; esac fi prompt=1 if grep -qs noprompt /proc/cmdline; then prompt= fi for path in $(which halt) $(which reboot) /etc/rc?.d /etc/default $(which stty) /bin/plymouth; do cache_path "$path" done device="$(grep " /cdrom " /proc/mounts | cut -d' ' -f1)" || device= # If /cdrom isn't mounted, don't try to eject it if [ -z "$device" ]; then return 0 fi # If the device exists but can't be found in /sys/block, it's most likely a partition # so unmount it (lazy mode) and sync if [ -b "$device" ] && [ ! -f "/sys/block/$(basename $device)/removable" ]; then umount -l $device >/dev/null 2>&1 sync return 0 fi # If we're still there, then we're probably a cdrom or other media # ship the eject if the kernel says the media isn't removable if [ "$(cat /sys/block/$(basename $device)/removable)" = "0" ]; then return 0 fi # XXX - i18n MSG="Please remove installation media and close the tray (if any) then press ENTER: " if [ "$prompt" ]; then if [ -x /bin/plymouth ] && plymouth --ping; then plymouth message --text="$MSG" else stty sane < /dev/console echo $MSG > /dev/console fi fi eject -p -m $device >/dev/null 2>&1 [ "$prompt" ] || return 0 if [ -x /bin/plymouth ] && plymouth --ping; then plymouth watch-keystroke > /dev/null else read x < /dev/console fi } case "$1" in restart|reload|force-reload|status) [ "$VERBOSE" != no ] && log_end_msg 0 ;; # We normally run on start; stop is just for backwards compatibility. start|stop) log_begin_msg "${NAME} is resyncing snapshots and caching reboot files..." do_stop case "$?" in 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; esac ;; *) log_success_msg "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 exit 3 ;; esac