]> git.sur5r.net Git - bacula/bacula/blob - bacula/scripts/dvd-writepart.in
- Fix name space pollution by OpenSSL 0.9.8 reported by
[bacula/bacula] / bacula / scripts / dvd-writepart.in
1 #!/bin/sh
2 #
3 # Bacula interface to growisofs, used to write to DVD+/-R(W)
4 #
5 #  $Id$
6 #
7 #  If you set in your Device resource
8 #
9 #  Write Part Command = "path-to-this-script/dvd-writepart %n %a %v"
10 #    you will have the following input to this script:
11 #
12 #  dvd-writepart "part_number"    "device"  "part_filename"
13 #                     $1             $2           $3
14 #
15 #  for example:
16 #
17 #  dvd-writepart 0 /dev/hda File-0001
18
19 MKISOFS=@MKISOFS@
20 GROWISOFS=@GROWISOFS@
21
22 # GROWARGS="-use-the-force-luke=tty -quiet"
23 GROWARGS="-quiet"
24
25 # Uncomment the following line if you do not want the tray to be reloaded
26 # when writing ends.
27 GROWARGS="${GROWARGS} -use-the-force-luke=notray"
28
29 # Uncomment the following line if you have a Linux kernel >=2.6.8, and
30 # if you want to allow a session to start beyond the 4gb boundary.
31 #GROWARGS="${GROWARGS} -use-the-force-luke=4gms"
32
33 #### You should probably not modify anything below this line
34
35 if test $# -ne 3 ; then
36   echo "usage: dvd-writepart part_number device part_filename"
37   echo "  Wrong number of arguments arguments given (!= 3)."
38   exit 1
39 fi
40
41 # Setup arguments
42 partnum=$1
43 dev=$2
44 filename=$3
45
46 if test $partnum = 1 ; then
47   arg="-Z"
48 else
49   arg="-M"  
50 fi
51
52 echo Running ${GROWISOFS} ${GROWARGS} $arg $dev -R $filename...
53
54 ${GROWISOFS} ${GROWARGS} $arg $dev -R $filename
55 rtn=$?
56
57 exit $rtn