[CRIU] [PATCH] zdtm.sh: remove warnings about existent directories

Andrey Vagin avagin at openvz.org
Tue Dec 22 12:52:27 PST 2015


From: Andrew Vagin <avagin at virtuozzo.com>

and call mknod with correct argumetns

Signed-off-by: Andrew Vagin <avagin at virtuozzo.com>
---
 test/zdtm.sh | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/test/zdtm.sh b/test/zdtm.sh
index 5e5efbe..74e56c0 100755
--- a/test/zdtm.sh
+++ b/test/zdtm.sh
@@ -542,19 +542,19 @@ construct_root()
 		done
 	done
 
-	mkdir $root/dev
-	mkdir $root/dev/pts
+	mkdir -p $root/dev
+	mkdir -p $root/dev/pts
 	mknod -m 0666 $root/dev/tty c 5 0
 	mknod -m 0666 $root/dev/null c 1 3
 	if [ -r "/dev/net/tun" ]; then
-		mkdir $root/dev/net/
+		mkdir -p $root/dev/net/
 		mknod -m 0666 $root/dev/net/tun c $(stat -c "0x%t" /dev/net/tun) $(stat -c "0x%T" /dev/net/tun)
 	fi
 	if [ -r "/dev/rtc" ]; then
-		mknod -m 0666 $root/dev/rtc -c $(stat -c "0x%t" /dev/rtc) $(stat -c "0x%T" /dev/rtc)
+		mknod -m 0666 $root/dev/rtc c $(stat -c "0x%t" /dev/rtc) $(stat -c "0x%T" /dev/rtc)
 	fi
 
-	mkdir $root/proc
+	mkdir -p $root/proc
 
 	# make 'tmp' dir under new root
 	mkdir -p $tmpdir
-- 
2.4.3



More information about the CRIU mailing list