idd.sh: Make blocksize setting var for dd
Former-commit-id: 3ea465146955300170cafad3ee5e8f82677aed47
This commit is contained in:
parent
e66bcb5030
commit
60840ca3e9
7
idd.sh
7
idd.sh
@ -1,5 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
# DD Options
|
||||
BLOCKSIZE="4" # in megabytes
|
||||
|
||||
# Paths
|
||||
MOUNTPATH="/mnt/mediadrive"
|
||||
DEVICEDIR="/dev"
|
||||
@ -148,7 +151,7 @@ case "$1" in
|
||||
echo
|
||||
printf "${LCYAN}Please wait ...${NC}\n"
|
||||
echo
|
||||
pv -tpreb ${filepath} | dd bs=1M of=${DEVICEDIR}/${devname}
|
||||
pv -tpreb ${filepath} | dd bs=${BLOCKSIZE}M of=${DEVICEDIR}/${devname}
|
||||
echo
|
||||
printf "${YELLOW}Syncing buffers...${NC}\n";sync
|
||||
echo
|
||||
@ -204,7 +207,7 @@ case "$1" in
|
||||
echo
|
||||
printf "${LCYAN}Please wait ...${NC}\n"
|
||||
echo
|
||||
pv -tpreb ${filepath} | dd bs=1M of=${DEVICEDIR}/${devname}
|
||||
pv -tpreb ${filepath} | dd bs=${BLOCKSIZE}M of=${DEVICEDIR}/${devname}
|
||||
echo
|
||||
printf "${YELLOW}Syncing buffers...${NC}\n";sync
|
||||
echo
|
||||
|
Loading…
x
Reference in New Issue
Block a user