Adding casper 1.68+debian-2. debian/1.68+debian-2
authorDaniel Baumann <daniel@debian.org>
Sun, 23 Sep 2007 12:46:25 +0000 (14:46 +0200)
committerDaniel Baumann <daniel@debian.org>
Sun, 23 Sep 2007 12:46:25 +0000 (14:46 +0200)
debian/casper.examples [moved from debian/examples with 100% similarity]
debian/casper.init
debian/casper.links [new file with mode: 0644]
debian/casper.lintian [moved from debian/lintian with 100% similarity]
debian/casper.manpage [new file with mode: 0644]
debian/changelog
debian/changelog.upstream
debian/manpage/casper.7 [new file with mode: 0644]
debian/rules
scripts/casper
scripts/casper-bottom/30accessibility

similarity index 100%
rename from debian/examples
rename to debian/casper.examples
index e0522e0..c69e387 100644 (file)
@@ -1,12 +1,36 @@
 #! /bin/sh
+### BEGIN INIT INFO
+# Provides:          casper
+# Required-Start:    $syslog
+# Required-Stop:     $syslog
+# Should-Start:      $local_fs
+# Should-Stop:       $local_fs
+# Default-Start:     1 2 3 4 5
+# Default-Stop:      0 6
+# Short-Description: Casper init script
+# Description:       Does the proper shutdown in a casper booted system.
+### END INIT INFO
 
-# check for netboot
-if grep -qs netboot /proc/cmdline || grep -qsi root=/dev/nfs /proc/cmdline  || grep -qsi root=/dev/cifs /proc/cmdline ; then
-       exit 0
-fi
+# Author: Tollef Fog Heen <tfheen@canonical.com>
+#         Marco Amadori <marco.amadori@gmail.com>
+#
+PATH=/usr/sbin:/usr/bin:/sbin:/bin
+NAME=casper
+SCRIPTNAME=/etc/init.d/$NAME
 
+# Exit if system was not booted by casper
 grep -qs boot=casper /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() {
@@ -26,20 +50,43 @@ cache_path() {
     fi
 }
 
-for path in $(which halt) $(which reboot) /etc/rc?.d /etc/default; do
-    cache_path "$path"
-done
+do_stop ()
+{
+       # 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
 
-eject -p -m /live_media >/dev/null 2>&1
+       for path in $(which halt) $(which reboot) /etc/rc?.d /etc/default; do
+               cache_path "$path"
+       done
 
-# XXX - i18n
-echo -n "Please remove the disc and close the tray (if any) then press ENTER: "
-if [ -x /sbin/usplash_write ]; then
-    /sbin/usplash_write "TIMEOUT 0"
-    /sbin/usplash_write "TEXT Please remove the disc, close the tray (if any)"
-    /sbin/usplash_write "TEXT and press ENTER to continue"
-fi
+       eject -p -m /live_media >/dev/null 2>&1
+
+       # XXX - i18n
+       echo -n "Please remove the disc and close the tray (if any) then press ENTER: "
+       if [ -x /sbin/usplash_write ]; then
+               /sbin/usplash_write "TIMEOUT 0"
+               /sbin/usplash_write "TEXT Please remove the disc, close the tray (if any)"
+               /sbin/usplash_write "TEXT and press ENTER to continue"
+       fi
+
+       read x < /dev/console
+}
 
-read x < /dev/console
+case "$1" in
+       start|restart|reload|force-reload|status)
+               ;;
+       stop)
+               do_stop
+               case "$?" in
+                       0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+                       2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+               esac
+               ;;
+       *)
+               echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+               exit 3
+               ;;
+esac
 
-exit 0
diff --git a/debian/casper.links b/debian/casper.links
new file mode 100644 (file)
index 0000000..0d1d1df
--- /dev/null
@@ -0,0 +1,2 @@
+/usr/share/man/man7/casper.7.gz /usr/share/man/man7/casper-getty.7.gz
+/usr/share/man/man7/casper.7.gz /usr/share/man/man7/casper-login.7.gz
similarity index 100%
rename from debian/lintian
rename to debian/casper.lintian
diff --git a/debian/casper.manpage b/debian/casper.manpage
new file mode 100644 (file)
index 0000000..c16a42d
--- /dev/null
@@ -0,0 +1 @@
+debian/manpage/casper.7
index 125ea94..c5eb235 100644 (file)
@@ -1,3 +1,11 @@
+casper (1.68+debian-2) unstable; urgency=low
+
+  * Changed "staticip=" boot param to just "ip=".
+  * Added a manpage for casper.
+  * Lintian cleanings.
+
+ -- Marco Amadori <marco.amadori@gmail.com>  Tue, 26 Sep 2006 00:45:21 +0200
+
 casper (1.68+debian-1) unstable; urgency=low
 
   * New upstream release.
index bcf6f11..0f50d72 100644 (file)
@@ -1,3 +1,9 @@
+casper (1.69) UNRELEASED; urgency=low
+
+  * Use grep -E in scripts/casper. Malone: #57620
+
+ -- Tollef Fog Heen <tfheen@ubuntu.com>  Mon, 25 Sep 2006 14:54:57 +0200
+
 casper (1.68) edgy; urgency=low
 
   * Honour console-setup/layoutcode and console-setup/variantcode preseeding
diff --git a/debian/manpage/casper.7 b/debian/manpage/casper.7
new file mode 100644 (file)
index 0000000..2b10fa3
--- /dev/null
@@ -0,0 +1,55 @@
+.TH CASPER 7 "Mon,  26 Sep 2006" "1.68" "Initramfs-tools hook"
+
+.SH NAME
+casper \- an hook for initramfs-tools to boot live systems.
+
+.SH SYNOPSIS
+.B BOOT=casper
+As kernel parameter boot prompt.
+
+.SH DESCRIPTION
+Casper is an hook for initramfs-tools used to boot live systems like those created by make-live, this includes the Debian-Live isos, netboot tarballs, and usb stick image and Ubuntu live cds. At boot time it will look for a (often read only) media containing a "/casper" directory where root filesystems (often squashfs compressed) lies and create, using unionfs, a writable environment for debian like systems to boot from.
+
+.SH RECOGNIZED BOOT OPTIONS
+.TP
+.BI "host=" HOSTNAME " , userfullname=" USERFULLNAME " , username=" USERNAME
+Those parameters lets you override values read from the config file.
+.TP
+.B casper-getty
+This enable a special serial login shell (experimental).
+.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 it if you want to use dhcp (default).
+.TP
+.BR ip[= frommedia ]
+This way dhcp and static configuration is just skipped and the system will use the (must be) media-preconfigured /etc/network/interfaces instead.
+
+.TP
+.BR "netboot[=" nfs "|" cifs ]
+This tells casper to look for a network mount, to be specified by parameter "nfsroot=" (with optional "nfsopts="), for the "/casper" dirs where root filesystem lies. 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", "casper-snap*", "home-snap*" and will try to, in order: mount as /cow the first, mount the second in /home, and just copy the contents of the latters in appropriate locations.
+.TP
+.B toram
+Adding this parameter, casper will try to copy to ram the whole read-only media before mounting the root filesystem(s), it could need a lot of ram, according to the space used by the read only media.
+
+.SH FILES
+.B /etc/casper.conf
+some variables could be configured via this config file.
+
+.SH BUGS
+.B casper
+works fully on amd64, i386 and ppc, it should too on other archs.
+
+.SH HOMEPAGE
+Debian Live project <http://live.debian.net/>
+
+.SH SEE ALSO
+.BR initramfs-tools(8), make-live(8), make-live.conf(8)
+
+.SH AUTHOR
+casper was written by Tollen Fog Heen <tfheen@canonical.com>, Matt Zimmerman <mdz@canonical.com>, and Marco Amadori <marco.amadori@gmail.com>,
+.TP
+This manual was written by Marco Amadori <marco.amadori@gmail.com>,
+for the Debian project (but may be used by others).
index d1d44a5..7c8c5a1 100755 (executable)
@@ -9,6 +9,7 @@ BUILD_SYSTEM := $(shell lsb_release --short --id)
 build: build-stamp
 build-stamp:
        dh_testdir
+
        # Setting BUILD_SYSTEM in the binary package
        sed -i -e 's/\(BUILD_SYSTEM="\).*"/\1'$(BUILD_SYSTEM)'"/g' casper.conf
 ifeq ($(BUILD_SYSTEM),Debian)
@@ -52,7 +53,7 @@ install: build
        chmod 0755 debian/casper/usr/share/initramfs-tools/scripts/casper
 
        # Installing lintian override
-       install -D -m 0644 debian/lintian debian/casper/usr/share/lintian/overrides/casper
+       install -D -m 0644 debian/casper.lintian debian/casper/usr/share/lintian/overrides/casper
 
        # Install casper.conf
        install -m 0644 casper.conf debian/casper/etc/casper.conf
@@ -83,6 +84,7 @@ else
        dh_installchangelogs -a
 endif
        dh_installdocs -a
+       dh_installman -a
        dh_installexamples -a
        dh_installinit -a -r --no-start -- start 89 0 6 .
        dh_link -a
index c019e3b..dba4b4a 100644 (file)
@@ -49,8 +49,8 @@ for x in $(cat /proc/cmdline); do
             export HIDECOW=1 ;;
         persistent)
             export PERSISTENT=1 ;;
-        staticip*)
-            STATICIP=${x#staticip=} 
+        ip*)
+            STATICIP=${x#ip=} 
             if [ "${STATICIP}" == "" ]; then
                 STATICIP="frommedia"
             fi
index b0c049b..e8e7e8a 100755 (executable)
@@ -52,7 +52,6 @@ for x in $(cat /proc/cmdline); do
                         gct -s -t string /desktop/gnome/peripherals/mouse/cursor_theme whiteglass
 
                         kderc_addtoprefixes /usr/share/kubuntu-default-settings/kde-profile/lesser-visual-impairment/
-                        fi
                         ;;
                         # Moderate Visual Impairment
                         access=v2)