]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/workunits/misc/dirfrag: make it work on ubuntu 691/head
authorYan, Zheng <zheng.z.yan@intel.com>
Mon, 14 Oct 2013 01:19:03 +0000 (09:19 +0800)
committerYan, Zheng <zheng.z.yan@intel.com>
Mon, 14 Oct 2013 01:19:56 +0000 (09:19 +0800)
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
qa/workunits/misc/dirfrag.sh

index 104b7bc02ae129a0b29a6ae23098e795782b4449..393667427fd89d8bd6088b7361a3ab68a03adf25 100755 (executable)
@@ -1,21 +1,23 @@
-#!/bin/sh -e
+#!/bin/bash
+
+set -e
 
 DEPTH=5
 COUNT=10000
 
-function kill_jobs {
+kill_jobs() {
   jobs -p | xargs kill
 }
-trap kill_jobs SIGINT
+trap kill_jobs INT
 
-function create_files {
+create_files() {
   for i in `seq 1 $COUNT`
   do
     touch file$i
   done
 }
 
-function delete_files {
+delete_files() {
   for i in `ls -f`
   do
     if [[ ${i}a = file*a ]]