-
Notifications
You must be signed in to change notification settings - Fork 3
/
changerootpasswd.sh
20 lines (16 loc) · 1.46 KB
/
changerootpasswd.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env bash
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2013 www.jd.com
#
# File: changerootpasswd.sh
# Author: xuriwuyun <xuriwuyun@gmail.com>
# Created: 11/19/2014 15:36:21
# Last_modified: 11/19/2014 15:45:46
if [ $# -ne 2 ]
then
echo USAGE: changerootpasswd image_file password
exit 1
fi
image_format=`qemu-img info $1|grep 'file format'|awk '{print $3}'`
python changerootpasswd.py $1 $image_format $2