Package: debian-reference-common
Version: 2.44
Severity: normal
Tags: patch
The example script in chapter 10 section 10.1.9
("A copy script for the data backup") uses the dash
shell but contains bashisms in the function definitions
that cause it to fail. Dash function definitions do
not take the 'function' keyword and so the script fails
at line 3 with a message "'Unexpected '('".
Attached is a patch which removes the 'function'
keywords from the function definitions.
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.32-3-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL
set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/dash
debian-reference-common depends on no packages.
debian-reference-common recommends no packages.
Versions of packages debian-reference-common suggests:
ii epiphany-browser [www-brows 2.30.2-3 Intuitive GNOME web browser
ii iceweasel [www-browser] 3.5.11-2 Web browser based on Firefox
ii lynx-cur [www-browser] 2.8.8dev.5-1 Text-mode WWW Browser with NLS sup
ii mc 3:4.7.0.9-1 Midnight Commander - a powerful fi
pn vim <none> (no description available)
ii w3m [www-browser] 0.5.2-9 WWW browsable pager with excellent
-- no debconf information
--- 10_datamngt.txt.bak 2010-10-12 15:57:03.000000000 -0400
+++ 10_datamngt.txt 2010-10-12 16:07:59.000000000 -0400
@@ -360,9 +360,9 @@
--------------------
#!/bin/sh -e
# Copyright (C) 2007-2008 Osamu Aoki <[email protected]>, Public Domain
-function fdot(){ find . -type d \( -iname ".?*" -o -iname "CVS" \) -prune -o
-print0;}
-function fall(){ find . -print0;}
-function mkdircd(){ mkdir -p "$1";chmod 700 "$1";cd "$1">/dev/null;}
+fdot(){ find . -type d \( -iname ".?*" -o -iname "CVS" \) -prune -o -print0;}
+fall(){ find . -print0;}
+mkdircd(){ mkdir -p "$1";chmod 700 "$1";cd "$1">/dev/null;}
FIND="fdot";OPT="-a";MODE="CPIOP";HOST="localhost";EXTP="$(hostname -f)"
BKUP="$(basename $(pwd)).bkup";TIME="$(date +%Y%m%d-%H%M%S)";BU="$BKUP/$TIME"
while getopts gcCsStrlLaAxe:h:T f; do case $f in