Skip to content

Commit

Permalink
Speed up the cleanup operation.
Browse files Browse the repository at this point in the history
dd has a low block size that causes the operation to go slower than
it needs to. Relates to GH-8
  • Loading branch information
casr committed Jan 3, 2014
1 parent 6bc36c6 commit 31f32bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ks.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,12 @@ chkconfig --level 345 rpcidmapd on
chkconfig --level 2345 sshd on

rm -rf /tmp/* /tmp/.[^.]+
dd if=/dev/zero of=/tmp/clean || rm -f /tmp/clean
dd if=/dev/zero of=/tmp/clean bs=1M || rm -f /tmp/clean


swappart=\`cat /proc/swaps | tail -n1 | awk -F ' ' '{print \$1}'\`
swapoff \$swappart
dd if=/dev/zero of=\$swappart
dd if=/dev/zero of=\$swappart bs=1M
mkswap \$swappart


Expand Down

0 comments on commit 31f32bc

Please sign in to comment.