2010-07-27 13:04:56 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2012-01-15 03:38:57 +00:00
|
|
|
apps="evince /usr/libexec/evinced soffice firefox"
|
2010-07-27 13:04:56 +00:00
|
|
|
|
2010-07-30 14:42:17 +00:00
|
|
|
cat /etc/dispvm-dotfiles.tbz | tar -xjf- --overwrite -C /home/user --owner user 2>&1 >/tmp/dispvm-dotfiles-errors.log
|
|
|
|
|
2010-07-27 13:04:56 +00:00
|
|
|
for app in $apps ; do
|
|
|
|
echo "Launching: $app..."
|
2012-01-15 03:41:51 +00:00
|
|
|
$app >>/tmp/dispvm_prerun_errors.log 2>&1 &
|
2010-07-27 13:04:56 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
echo "Sleeping..."
|
2012-01-15 03:42:35 +00:00
|
|
|
PREV_IO=0
|
|
|
|
while true; do
|
|
|
|
IO=`vmstat -D | awk '/read|write/ {IOs+=$1} END {print IOs}'`
|
|
|
|
if [ $IO -lt $[ $PREV_IO + 50 ] ]; then
|
|
|
|
break;
|
|
|
|
fi
|
|
|
|
PREV_IO=$IO
|
|
|
|
sleep 1
|
|
|
|
done
|
2010-07-27 13:04:56 +00:00
|
|
|
|
|
|
|
ps ax > /tmp/dispvm-prerun-proclist.log
|
|
|
|
|
2012-01-15 03:41:51 +00:00
|
|
|
cat /etc/dispvm-dotfiles.tbz | tar -xjf- --overwrite -C /home/user --owner user 2>&1 >>/tmp/dispvm-dotfiles-errors.log
|
2010-07-27 13:04:56 +00:00
|
|
|
|
|
|
|
echo done.
|