Package: fai-server
Version: 3.2.1
Severity: normal
Tags: patch

Subject explain it all. (k)ubuntu uses dash as default /bin/sh
so $[...] breaks for all system with the same setup. Patch appended.

Achim

-- System Information:
Debian Release: lenny/sid
  APT prefers gutsy-updates
  APT policy: (500, 'gutsy-updates'), (500, 'gutsy-security'), (500, 'gutsy')
Architecture: i386 (i686)

Kernel: Linux 2.6.22-12-generic (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
--- subroutines-linux.orig      2007-09-19 00:06:53.000000000 +0200
+++ subroutines-linux   2007-09-26 01:25:49.000000000 +0200
@@ -255,7 +255,7 @@
     fai-divert -R
     rm -f $FAI_ROOT/etc/apt/apt.conf.d/{10,90}fai
     date
-    echo "The $FAI_ACTION took $[$(cut -d . -f 1 /proc/uptime)-$start_seconds] 
seconds."
+    echo "The $FAI_ACTION took $(expr $(cut -d . -f 1 /proc/uptime) - 
$start_seconds) seconds."
 }
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 task_chboot() {
=== modified file 'debian/changelog'
--- debian/changelog    2007-09-25 23:23:21 +0000
+++ debian/changelog    2007-09-25 23:46:50 +0000
@@ -10,6 +10,7 @@
     as default.
   * make-fai-nfsroot: mount devpts and reorder umounts so umount of
     devpts is working.
+  * lib/subroutines*: replace bashism $[...] with $(expr ...)
 
  -- Achim Bohnet <[EMAIL PROTECTED]>  Wed, 26 Sep 2007 01:05:19 +0200
 

=== modified file 'lib/subroutines'
--- lib/subroutines     2007-08-30 17:57:38 +0000
+++ lib/subroutines     2007-09-25 23:46:50 +0000
@@ -515,7 +515,8 @@
     task instsoft
     task configure
     date
-    echo "The $FAI_ACTION took $[$(cut -d . -f 1 /proc/uptime)-$start_seconds] 
seconds."
+    echo "The $FAI_ACTION took $(expr $(cut -d . -f 1 /proc/uptime) - 
$start_seconds) seconds."
+
 
     rm -f $stamp
     # save again, because new messages could be created

=== modified file 'lib/subroutines-linux'
--- lib/subroutines-linux       2007-08-28 15:03:23 +0000
+++ lib/subroutines-linux       2007-09-25 23:46:50 +0000
@@ -255,7 +255,7 @@
     fai-divert -R
     rm -f $FAI_ROOT/etc/apt/apt.conf.d/{10,90}fai
     date
-    echo "The $FAI_ACTION took $[$(cut -d . -f 1 /proc/uptime)-$start_seconds] 
seconds."
+    echo "The $FAI_ACTION took $(expr $(cut -d . -f 1 /proc/uptime) - 
$start_seconds) seconds."
 }
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 task_chboot() {

Reply via email to