Mike Brady wrote:
> Centos/RHEL comes with nc rather than netcat, but that is allowed for.  I 
> didn't
> have 'which' installed.  I changed the script to use 'type -p' instead (as it 
> is
> a shell builtin and should always be available) and it now works.
> 
> Thanks
> 
> Mike

Very good. Applied the following patch to the trunk.

-Andrea

-------- Original Message --------
Subject: [systemimager-commits] r4075 - in trunk: .     
var/lib/systemimager/scripts/post-install
Date: Mon, 04 Jun 2007 05:38:29 -0500
From: [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]

Author: arighi
Date: 2007-06-04 05:38:25 -0500 (Mon, 04 Jun 2007)
New Revision: 4075

Modified:
   trunk/CREDITS
   trunk/var/lib/systemimager/scripts/post-install/95all.monitord_rebooted
Log:
- fix: use "type -p" instead of which

In some minimal installations 'which' could be missing. The command 'type',
instead, should be always present.

Reported by: Mike Brady <[EMAIL PROTECTED]>


Modified: trunk/CREDITS
===================================================================
--- trunk/CREDITS       2007-06-01 09:08:13 UTC (rev 4074)
+++ trunk/CREDITS       2007-06-04 10:38:25 UTC (rev 4075)
@@ -36,6 +36,11 @@
 N: Tony Beauregard
 E: [EMAIL PROTECTED]
 
+N: Mike Brady
+E: [EMAIL PROTECTED]
+D: bug fix to use 'type -p' instead of 'which' in the 95all.monitord_rebooted
+D: post-install script
+
 N: Joshua Cope
 E: [EMAIL PROTECTED]
 D: bug fix for ssh (libnss_files dependency)

Modified: 
trunk/var/lib/systemimager/scripts/post-install/95all.monitord_rebooted
===================================================================
--- trunk/var/lib/systemimager/scripts/post-install/95all.monitord_rebooted     
2007-06-01 09:08:13 UTC (rev 4074)
+++ trunk/var/lib/systemimager/scripts/post-install/95all.monitord_rebooted     
2007-06-04 10:38:25 UTC (rev 4075)
@@ -25,7 +25,7 @@
     send_msg=`echo "mac=$mac:ip=$IPADDR:host=$HOSTNAME:$msg"`
 
     # Find netcat binary
-    netcat=`(which netcat || which nc) 2>/dev/null`
+    netcat=`(type -p netcat || type -p nc) 2>/dev/null`
     [ -z $netcat ] && return
 
     rebooted_state_file=/etc/systemimager/si_monitor.client.rebooted

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
sisuite-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sisuite-users

Reply via email to