#!/bin/sh # Script that unmounts all sd/mmc cards mounted # To be placed in /etc/pm/sleep.d/ # It's a workarround for the following bug # https://bugs.launchpad.net/ubuntu/+source/linux/+bug/464712 # # Copyright: Copyright (c) 2010 Aitor Pazos # License: GPL-2 # PATH=/sbin:/usr/sbin:/bin:/usr/bin DEVICES=`mount | grep /dev/mmcblk | cut -d ' ' -f1` for device in $DEVICES do echo "Unmounting $device"; umount $device; done;