diff options
-rwxr-xr-x | samizdat-eject.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/samizdat-eject.sh b/samizdat-eject.sh index 04ee610..f5360a7 100755 --- a/samizdat-eject.sh +++ b/samizdat-eject.sh | |||
@@ -10,6 +10,10 @@ btrfs_subdevices() | |||
10 | 10 | ||
11 | devices=$(btrfs_subdevices /) || exit 1 | 11 | devices=$(btrfs_subdevices /) || exit 1 |
12 | 12 | ||
13 | target=$1 | ||
14 | |||
15 | [ -e "$target" ] && exit 1 | ||
16 | |||
13 | set -- | 17 | set -- |
14 | seen= | 18 | seen= |
15 | for dev in $devices; do | 19 | for dev in $devices; do |
@@ -23,7 +27,7 @@ done | |||
23 | 27 | ||
24 | copy() | 28 | copy() |
25 | { | 29 | { |
26 | mdadm_copy_eject /dev/md55 /root/samizdat.iso | 30 | mdadm_copy_eject /dev/md55 "$target" |
27 | } | 31 | } |
28 | 32 | ||
29 | remove() | 33 | remove() |