diff options
| author | Daniel Baumann <daniel@debian.org> | 2007-09-23 14:46:30 +0200 |
|---|---|---|
| committer | Daniel Baumann <daniel@debian.org> | 2007-09-23 14:46:30 +0200 |
| commit | 9fda4b0552744a305a699855e2ad3907e8cab164 (patch) | |
| tree | fe188681a51e406a3811bb708c6d3df31cb3e5a8 /bin | |
| parent | beec4f9fb766be23d575b070e398639d5a4a9c9d (diff) | |
| download | live-boot-9fda4b0552744a305a699855e2ad3907e8cab164.tar.gz live-boot-9fda4b0552744a305a699855e2ad3907e8cab164.zip | |
Adding casper 1.81+debian-1.
Diffstat (limited to 'bin')
| -rwxr-xr-x[-rw-r--r--] | bin/casper-getty | 4 | ||||
| -rwxr-xr-x[-rw-r--r--] | bin/casper-login | 2 | ||||
| -rwxr-xr-x | bin/casper-reconfigure | 3 | ||||
| -rwxr-xr-x[-rw-r--r--] | bin/casper-snapshot | 30 |
4 files changed, 19 insertions, 20 deletions
diff --git a/bin/casper-getty b/bin/casper-getty index 3b8cbeb..f885fa9 100644..100755 --- a/bin/casper-getty +++ b/bin/casper-getty @@ -1,7 +1,7 @@ -#!/bin/sh +#! /bin/sh autologin=1 -for opt in $* ; do +for opt in "$@" ; do if [ "$opt" = "-l" -o "$opt" = "-n" ] ; then autologin=0 fi diff --git a/bin/casper-login b/bin/casper-login index 030c63d..e6a4173 100644..100755 --- a/bin/casper-login +++ b/bin/casper-login @@ -1,4 +1,4 @@ -#!/bin/sh +#! /bin/sh USERNAME=root [ -f /etc/casper.conf ] && . /etc/casper.conf diff --git a/bin/casper-reconfigure b/bin/casper-reconfigure index 7b96e28..4e29768 100755 --- a/bin/casper-reconfigure +++ b/bin/casper-reconfigure @@ -1,4 +1,4 @@ -#!/bin/sh +#! /bin/sh set -e export PATH=/usr/bin:/usr/sbin:/sbin:/bin @@ -49,5 +49,4 @@ fi runcommandinroot "$root" dpkg-reconfigure -fnoninteractive --no-reload "$package" - exit 0 diff --git a/bin/casper-snapshot b/bin/casper-snapshot index c0c8662..e912493 100644..100755 --- a/bin/casper-snapshot +++ b/bin/casper-snapshot @@ -1,4 +1,4 @@ -#!/bin/bash +#! /bin/bash # casper-snapshot - utility to manage Debian Live systems snapshots # @@ -25,7 +25,7 @@ # 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}`" +PROGRAM="`basename $0`" VERSION=0.0.1 @@ -152,8 +152,8 @@ Do_snapshot () Is_same_mount () { - dir1="`Base_path ${1}`" - dir2="`Base_path ${2}`" + dir1="`Base_path $1`" + dir2="`Base_path $2`" if [ "${dir1}" == "${dir2}" ]; then return 0 else @@ -164,10 +164,10 @@ Is_same_mount () Parse_args () { # Parse command line - ARGS="${1}" + ARGS="$1" 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 -- ${ARGS}`" - if [ "${?}" != "0" ]; then + if [ "$?" != "0" ]; then echo "Terminating." >&2 exit 1 fi @@ -175,17 +175,17 @@ Parse_args () eval set -- "${ARGUMENTS}" while true; do - case "${1}" in + case "$1" in -c|--cow) - SNAP_COW="${2}"; shift 2 ;; + SNAP_COW="$2"; shift 2 ;; -d|--device) - SNAP_DEV="${2}"; shift 2 ;; + SNAP_DEV="$2"; shift 2 ;; -o|--output) - SNAP_OUTPUT="${2}"; shift 2 ;; + SNAP_OUTPUT="$2"; shift 2 ;; -t|--type) - SNAP_TYPE="${2}"; shift 2 ;; + SNAP_TYPE="$2"; shift 2 ;; -r|--resync-string) - SNAP_RSTRING="${2}"; break ;; + SNAP_RSTRING="$2"; break ;; -h|--help) Help; shift ;; -u|--usage) @@ -202,7 +202,7 @@ Parse_args () Mount_device () { - dev="${1}" + dev="$1" if [ ! -d "${MOUNTP}" ]; then mkdir -p "${MOUNTP}" @@ -290,10 +290,10 @@ Clean () Main () { - Parse_args "${@}" + Parse_args "$@" Defaults Do_snapshot Clean } -Main "${@}" +Main "$@" |
