code.fastix.org

Dateiansicht:

Datei:Projekte -> Linux:ubuntu-for-raspberry-installer -> rpi2-clear.sh
md5:5c229f59a91989f2279579cf15d54616
sha1:5d0b28a1ef83e882361c682ed531109f4868061e
Download-Link:Download
  1. #!/usr/bin/sudo /bin/sh
  2.  
  3. set -x
  4. if [ -z "${BUILD_HOSTNAME}" ]; then
  5. . ./rpi2-settings.sh
  6. fi
  7.  
  8. if [ -f ${BASEDIR}/build/chroot/proc ]; then
  9.     umount ${BASEDIR}/build/chroot/proc
  10. fi
  11.  
  12. if [ -f ${BASEDIR}/build/chroot/sys ]; then
  13.     umount ${BASEDIR}/build/chroot/sys
  14. fi
  15.  
  16. file_swap=`swapon -s | grep "${BASEDIR}" | sed "s/ .*$//"`
  17. if [ ! -n ${file_swap} ]; then
  18.   swapoff ${file_swap}
  19. fi
  20.  
  21. if [ -f ${BASEDIR} ]; then
  22.     rm -r ${BASEDIR}
  23. fi