summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
Diffstat (limited to 'debian')
-rw-r--r--debian/casper.init44
-rw-r--r--debian/changelog21
-rw-r--r--debian/control6
-rw-r--r--debian/control.debian6
-rw-r--r--debian/control.ubuntu2
-rw-r--r--debian/manpage/casper-snapshot.128
-rw-r--r--debian/manpage/casper.710
7 files changed, 69 insertions, 48 deletions
diff --git a/debian/casper.init b/debian/casper.init
index d6ec097..6817efd 100644
--- a/debian/casper.init
+++ b/debian/casper.init
@@ -8,7 +8,8 @@
# 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.
+# Description: Resyncs snapshots, evantually caches files in order
+# to let remove the media.
### END INIT INFO
# Author: Tollef Fog Heen <tfheen@canonical.com>
@@ -16,7 +17,8 @@
#
PATH=/usr/sbin:/usr/bin:/sbin:/bin
NAME=casper
-SCRIPTNAME=/etc/init.d/$NAME
+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
@@ -50,34 +52,19 @@ cache_path() {
fi
}
-do_sync ()
-{
- # copy the tmp media on the snapshot media
- fromdir="${1}"
- todev="${2}"
- tmnt="/mnt/temp_snap"
-
- mkdir "${tmnt}" && \
- mount "${todev}" "${tmnt}" -o rw && \
- cd "${fromdir}" && \
- find . -print0 | cpio -pumd0 "${tmnt}" && \
- umount "${tmnt}" && \
- rmdir "${tmnt}"
-}
-
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
-
if [ ! -z "${ROOTSNAP}" ]; then
- do_sync "/cow" "${ROOTSNAP}"
+ $DO_SNAPSHOT --resync-string="${ROOTSNAP}"
fi
if [ ! -z "${HOMESNAP}" ]; then
- do_sync "/home" "${HOMESNAP}"
+ $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
for path in $(which halt) $(which reboot) /etc/rc?.d /etc/default; do
@@ -89,9 +76,9 @@ do_stop ()
# XXX - i18n
echo "Please remove the disc and close the tray (if any) then press ENTER: "
if [ -x /sbin/usplash_write ]; then
- /sbin/usplash_write "TIMEOUT 86400"
- /sbin/usplash_write "TEXT-URGENT Please remove the disc, close the tray (if any)"
- /sbin/usplash_write "TEXT-URGENT and press ENTER to continue"
+ /sbin/usplash_write "TIMEOUT 86400"
+ /sbin/usplash_write "TEXT-URGENT Please remove the disc, close the tray (if any)"
+ /sbin/usplash_write "TEXT-URGENT and press ENTER to continue"
fi
read x < /dev/console
@@ -102,7 +89,7 @@ case "$1" in
[ "$VERBOSE" != no ] && log_end_msg 0
;;
stop)
- log_begin_msg "Caching reboot files..."
+ log_begin_msg "${NAME} is resyncing snapshots and caching reboot files..."
do_stop
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
@@ -114,4 +101,3 @@ case "$1" in
exit 3
;;
esac
-
diff --git a/debian/changelog b/debian/changelog
index 6887ad3..c2ca6ca 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,24 @@
+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 <marco.amadori@gmail.com> Mon, 30 Oct 2006 17:06:48 +0100
+
casper (1.77+debian-1) unstable; urgency=low
* New upstream release.
diff --git a/debian/control b/debian/control
index 95a6edd..0ebb148 100644
--- a/debian/control
+++ b/debian/control
@@ -8,10 +8,10 @@ Standards-Version: 3.7.2
Package: casper
Architecture: any
-Depends: initramfs-tools (>= 0.40), user-setup, sudo
-Conflicts: usplash (<< 0.4-0)
+Depends: initramfs-tools (>= 0.40), user-setup, sudo, lsb-base (>= 3.0-6)
+Conflicts: usplash (<< 0.3-0)
Recommends: live-package
-Suggests: dmsetup, squashft-tools, genext2fs
+Suggests: squashfs-tools, genext2fs
Tag: admin::boot, admin::filesystem, implemented-in::shell, protocol::smb, role::plugin, scope::utility, special::completely-tagged, works-with-format::iso9660
Description: Debian Live initramfs generator
Casper provides an initramfs generator suited for booting a Debian Live systems
diff --git a/debian/control.debian b/debian/control.debian
index 95a6edd..0ebb148 100644
--- a/debian/control.debian
+++ b/debian/control.debian
@@ -8,10 +8,10 @@ Standards-Version: 3.7.2
Package: casper
Architecture: any
-Depends: initramfs-tools (>= 0.40), user-setup, sudo
-Conflicts: usplash (<< 0.4-0)
+Depends: initramfs-tools (>= 0.40), user-setup, sudo, lsb-base (>= 3.0-6)
+Conflicts: usplash (<< 0.3-0)
Recommends: live-package
-Suggests: dmsetup, squashft-tools, genext2fs
+Suggests: squashfs-tools, genext2fs
Tag: admin::boot, admin::filesystem, implemented-in::shell, protocol::smb, role::plugin, scope::utility, special::completely-tagged, works-with-format::iso9660
Description: Debian Live initramfs generator
Casper provides an initramfs generator suited for booting a Debian Live systems
diff --git a/debian/control.ubuntu b/debian/control.ubuntu
index 77c9cb2..88e4c09 100644
--- a/debian/control.ubuntu
+++ b/debian/control.ubuntu
@@ -9,7 +9,7 @@ Package: casper
Architecture: any
Section: misc
Priority: extra
-Depends: initramfs-tools (>= 0.40ubuntu11), dmsetup, user-setup, sudo
+Depends: initramfs-tools (>= 0.40ubuntu11), user-setup, sudo
Conflicts: usplash (<< 0.4-27)
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
diff --git a/debian/manpage/casper-snapshot.1 b/debian/manpage/casper-snapshot.1
index 1e17251..3cd5309 100644
--- a/debian/manpage/casper-snapshot.1
+++ b/debian/manpage/casper-snapshot.1
@@ -7,24 +7,30 @@ casper-snapshot \- a simple script to ease persistence usage.
.B casper-snapshot
.RB [\| \-c \||\| \-\-cow
.IR DIRECTORY \|]
-.RB [\| \-d \||\| \-\-destination
-.IR DIRECTORY \||\| FILE \|]
+.RB [\| \-d \||\| \-\-device
+.IR DEVICE \|]
+.RB [\| \-e \||\| \-\-exclude\-list
+.IR FILE \|]
.RB [\| \-o \||\| \-\-output
.IR FILE \|]
.RB [\| \-t \||\| \-\-type
.IR TYPE \|]
.PP
-.B make-live
+.B casper-snapshot
+.RB \-r \||\| \-\-resync\-string
+.IR STRING
+.br
+.B casper-snapshot
.RB \-h \||\| \-\-help
.br
-.B make-live
+.B casper-snapshot
.RB \-u \||\| \-\-usage
.br
-.B make-live
+.B casper-snapshot
.RB \-v \||\| \-\-version
.SH DESCRIPTION
-Casper-snapshot is a script useful to build the right types of persistent image files supported by casper.
+Casper-snapshot is a script useful 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
@@ -32,9 +38,17 @@ Casper-snapshot is a script useful to build the right types of persistent image
specifies the input directory to be cloned in the image file.
This parameters often does not need to be specified as the default of "/cow" for it 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, \-\-destination" DIRECTORY
+.BI "\-d, \-\-device" DEVICE
+the device on where the media which the snapshot/persistence file/partition will be put. If not specified a tmpfs will be used and linked on user's desktop to move it where he/her wants. If the device has not a filesystem on it, an ext2 fs will be created in it and labeled like --output options or with a sane default.
+.TP
+.BI "\-e, \-\-exclude\-list" FILE
+you could pass a list of filenames/path that should not be saved. This exclude list will be remebered on the target snapshotting media for reuse.
.TP
.BI "\-o, \-\-output" FILE
+the filename/label to be used for the output file/partition, if left blank it could 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
diff --git a/debian/manpage/casper.7 b/debian/manpage/casper.7
index 89f1cf2..794ee0d 100644
--- a/debian/manpage/casper.7
+++ b/debian/manpage/casper.7
@@ -1,7 +1,7 @@
.TH CASPER 7 "Thu, 28 Sep 2006" "1.69" "Initramfs-tools hook"
.SH NAME
-casper \- an hook for initramfs-tools to boot live systems.
+casper \- a hook for initramfs-tools to boot live systems.
.SH SYNOPSIS
.B BOOT=casper
@@ -15,11 +15,11 @@ Casper is an hook for initramfs-tools used to generate initramfs able to boot li
.B casper-getty
This enable a special serial login shell (experimental).
.TP
-.BI "host=" HOSTNAME " , userfullname=" USERFULLNAME " , username=" USERNAME
+.BI "hostname=" HOSTNAME " , userfullname=" USERFULLNAME " , username=" USERNAME
Those parameters lets you override values read from the config file.
.TP
-.BI "keyb=" KEYBOARD " | kbd-chooser/method=" KEYBOARD "; console-setup/layoutcode=" LAYOUT ", console-setup/variantcode=" VARIANT
-Configure the running keyboard as specified, if this one misses casper behave as "keyb=us" was specified. (It will be interfered from "locale=" somewhere in the future). You could also specify layout and variant (no defaults).
+.BI "keyb=" KEYBOARD " | kbd-chooser/method=" KEYBOARD " ; console-setup/layoutcode=" LAYOUT " , console-setup/variantcode=" VARIANT " , console-setup/modelcode" CODE
+Configure the running keyboard as specified, if this one misses casper behave as "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 layout, variant, and code (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 it if you want to use dhcp (default).
@@ -28,7 +28,7 @@ Let you specify the name(s) and the options of the interface(s) that should be c
This way dhcp and static configuration is just skipped and the system will use the (must be) media-preconfigured /etc/network/interfaces instead.
.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.
+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
.BI live-media= DEVICE " | bootfrom=" DEVICE
If you specify one of this two equivalent forms, casper will try first to look on this device for the "/casper" directory where it should lie the read-only root filesystem, if it did not find it, the normal scan for block devices will be performed.