Permalink
Browse files

add a sample execscript.sh.

  • Loading branch information...
1 parent 398519d commit 64ede00448a4763b1c46034fa0698fdbbd147135 @hansode committed Apr 27, 2012
Showing with 36 additions and 0 deletions.
  1. +36 −0 kvm/rhel/6/execscript.sh.example
View
36 kvm/rhel/6/execscript.sh.example
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+set -x
+set -e
+
+echo "doing execscript.sh: $1"
+
+cat <<'EOS' | chroot $1 bash -c "cat | bash"
+# change root passwd
+echo root:root | chpasswd
+
+# instlall package
+distro_pkgs="
+ vim-minimal
+ screen
+ git
+ make
+ sudo
+"
+yum install -y ${distro_pkgs}
+
+cd /tmp
+
+echo "git clone."
+[ -d gist-1108422 ] || git clone git://gist.github.com/1108422.git gist-1108422
+cd gist-1108422
+pwd
+
+echo "add work user."
+./add-work-user.sh
+
+echo "change normal user password"
+eval $(./detect-linux-distribution.sh)
+devel_user=$(echo ${DISTRIB_ID} | tr A-Z a-z)
+echo ${devel_user}:${devel_user} | chpasswd
+EOS

0 comments on commit 64ede00

Please sign in to comment.