ctdb-scripts: Fix the regular expresssion for parsing /proc/locks
authorAmitay Isaacs <amitay@gmail.com>
Thu, 25 Sep 2014 02:46:22 +0000 (12:46 +1000)
committerMartin Schwenke <martins@samba.org>
Thu, 25 Sep 2014 05:19:59 +0000 (07:19 +0200)
The major and minor device numbers are hexadecimal not decimal.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Thu Sep 25 07:19:59 CEST 2014 on sn-devel-104

ctdb/config/debug_locks.sh

index 54b52ed146479d1ad6559816a394cc1d3246e729..33bf3e63ddef3498c88280657ecbd4fcd8e51b21 100755 (executable)
@@ -28,7 +28,7 @@ loadconfig ctdb
     sed_cmd=$( ls -li "$CTDB_DBDIR"/*.tdb.* "$CTDB_DBDIR_PERSISTENT"/*.tdb.* |
           sed -e "s#${CTDB_DBDIR}/\(.*\)#\1#" \
               -e "s#${CTDB_DBDIR_PERSISTENT}/\(.*\)#\1#" |
-          awk '{printf "s#[0-9]*:[0-9]*:%s #%s #\n", $1, $10}' )
+          awk '{printf "s#[0-9a-f]*:[0-9a-f]*:%s #%s #\n", $1, $10}' )
 
     # Parse /proc/locks and extract following information
     #    pid process_name tdb_name offsets [W]