rudimentary java library beginning. cleaned up scripts quite
[feisty_meow.git] / scripts / system / osx_cd_mounter.sh
1 #!/bin/bash
2
3 # keeps trying to mount the cd on a mac mini to overcome
4 # a new bug in itunes seen as of osx leopard upgrade.
5
6 mountpoint=/Volumes/mounty_cd
7
8 echo "$(date_stringer): starting cd mounter..."
9
10 while true; do
11   if [ ! -d $mountpoint ]; then
12     mkdir $mountpoint
13   fi
14
15   found_device=$(mount|grep -i cddafs)
16   if [ -z "$found_device" ]; then
17     echo "$(date_stringer): cd not mounted--pausing before attempt..."
18     sleep 7
19     echo "$(date_stringer): cd not mounted--now trying to mount..."
20     mount -t cddafs /dev/disk1 $mountpoint
21   else
22     echo "$(date_stringer): cd already mounted--ignoring it."
23   fi
24   sleep 7
25 done
26
27