Whamcloud - gitweb
LU-2302 scripts: fix lfs_migrate with non-English locale
authorDaniel Kobras <d.kobras@science-computing.de>
Wed, 28 Nov 2012 17:47:18 +0000 (09:47 -0800)
committerOleg Drokin <green@whamcloud.com>
Mon, 17 Dec 2012 06:43:19 +0000 (01:43 -0500)
Parsing of stat output assumes an English locale. Make sure
this is always the case.

Signed-off-by: Daniel Kobras <d.kobras@science-computing.de>
Change-Id: I66acd6eb49cac749db701b97a5a375dc3b141a01
Reviewed-on: http://review.whamcloud.com/4697
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
lustre/scripts/lfs_migrate

index 969386e..1f35568 100755 (executable)
@@ -93,7 +93,7 @@ lfs_migrate() {
                $ECHO -n "$OLDNAME: "
 
                # avoid duplicate stat if possible
-               TYPE_LINK=($(stat -c "%h %F" "$OLDNAME" || true))
+               TYPE_LINK=($(LANG=C stat -c "%h %F" "$OLDNAME" || true))
 
                # skip non-regular files, since they don't have any objects
                # and there is no point in trying to migrate them.