summaryrefslogtreecommitdiff
path: root/sys/lib/backup/dupdisc
diff options
context:
space:
mode:
authorTaru Karttunen <taruti@taruti.net>2011-03-30 16:53:33 +0300
committerTaru Karttunen <taruti@taruti.net>2011-03-30 16:53:33 +0300
commite463eb40363ff4c68b1d903f4e0cdd0ac1c5977f (patch)
treed5e9f57c28f026cb21de3bd77cc10cd7f64aaa85 /sys/lib/backup/dupdisc
parentb41b9034225ab3e49980d9de55c141011b6383b0 (diff)
Import sources from 2011-03-30 iso image - sys/lib
Diffstat (limited to 'sys/lib/backup/dupdisc')
-rwxr-xr-xsys/lib/backup/dupdisc23
1 files changed, 23 insertions, 0 deletions
diff --git a/sys/lib/backup/dupdisc b/sys/lib/backup/dupdisc
new file mode 100755
index 000000000..4532f933d
--- /dev/null
+++ b/sys/lib/backup/dupdisc
@@ -0,0 +1,23 @@
+#!/bin/rc
+# dupdisc indev outdev - duplicate all blu-ray disc data tracks
+rfork ne
+if (! ~ $#* 2 || ~ $1 $2 || ~ $1 /dev/* || ~ $2 /dev/*) {
+ echo usage: $0 indev outdev >[1=2]
+ exit usage
+}
+echo copying /dev/$1 tracks to /dev/$2
+sleep 2
+
+umount /mnt/cd >[2]/dev/null
+cdfs -d /dev/$1 || exit
+cdfs -d /dev/$2 -m /n/copy || exit
+
+for (t in `{ls -p /mnt/cd | grep '^d'}) {
+ echo $t:
+ grep next /n/copy/ctl
+ pump -b 1048576 -k 51200 -d 10 </mnt/cd/$t >/n/copy/wd/$t
+ ls -l /n/copy
+}
+echo 'remember to *not* rm /mnt/cd/wd' >[1=2]
+# don't remove /mnt/cd/wd, since that would finalize the disc
+# and bugger the permanent toc, at least on bd-r.