Advertisement
Guest User

Compress /usr rebuild

a guest
Feb 23rd, 2010
350
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.44 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. #This script comes with ABSOLUTELY NO WARRANTY use it at your own risk!
  4.  
  5. #cron job to rebuild the squashfs image of /usr
  6. if [[ -e /var/lib/pacman/db.lck ]]; then
  7.   exit
  8. fi
  9.   mksquashfs /usr /squashed/usr/usr_tmp.sfs -b 65536
  10.   umount -l /usr
  11.   umount -l /squashed/usr/ro
  12.   rm /squashed/usr/usr.sfs
  13.   mv /squashed/usr/usr_temp.sfs /squashed/usr/usr.sfs
  14.   rm -rf /squashed/usr/rw/*
  15.   mount /squashed/usr/ro
  16.   mount /usr[/code]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement