Sophie

Sophie

distrib > Mageia > 7 > i586 > media > core-release > by-pkgid > c806015cfb8b09ded9156630d8372907 > files > 39

backuponcd-0.9.1-18.mga7.noarch.rpm

#!/bin/sh
#
# /usr/doc/backuponcd/samples/simple_read
# a very simple example how to read an archive stored on
# several CDs. Must be killed by typing ^C if reading is
# finished.
#
device="0,3,0"
rawdevice=/dev/cdrom
mountpt=/cdrom

while true; do
  cdrecord dev=$device -eject > /dev/null 2>&1
  echo -e "\a\n Please insert the (next) volume" > /dev/tty
  read ans
  mount -t iso9660 -o ro,noexec $rawdevice $mountpt
  if test $? -eq 0; then
    echo "Now reading the volume..." > /dev/tty
    cat /cdrom/*gz*
  else
    echo -e "\a\n Mount failed." > /dev/tty
  fi
  umount $mountpt
done 2> /dev/tty < /dev/tty