diff options
author | Andrew Cady <d@jerkface.net> | 2016-04-27 06:54:47 -0400 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2016-04-27 06:54:47 -0400 |
commit | 8c8a748158859f7aa05edb4f230f6da233f3306f (patch) | |
tree | af2196770acd6958ba4d970039e84823a1fcb958 /samizdat-eject.sh | |
parent | 595f36b990fd3fc99e6d911465a2e68c0f3a6eab (diff) |
samizdat eject accepts target filename
Diffstat (limited to 'samizdat-eject.sh')
-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() |