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
|
#!/bin/bash
|
||||||
|
|
||||||
|
# DD Options
|
||||||
|
BLOCKSIZE="4" # in megabytes
|
||||||
|
|
||||||
# Paths
|
# Paths
|
||||||
MOUNTPATH="/mnt/mediadrive"
|
MOUNTPATH="/mnt/mediadrive"
|
||||||
DEVICEDIR="/dev"
|
DEVICEDIR="/dev"
|
||||||
@ -148,7 +151,7 @@ case "$1" in
|
|||||||
echo
|
echo
|
||||||
printf "${LCYAN}Please wait ...${NC}\n"
|
printf "${LCYAN}Please wait ...${NC}\n"
|
||||||
echo
|
echo
|
||||||
pv -tpreb ${filepath} | dd bs=1M of=${DEVICEDIR}/${devname}
|
pv -tpreb ${filepath} | dd bs=${BLOCKSIZE}M of=${DEVICEDIR}/${devname}
|
||||||
echo
|
echo
|
||||||
printf "${YELLOW}Syncing buffers...${NC}\n";sync
|
printf "${YELLOW}Syncing buffers...${NC}\n";sync
|
||||||
echo
|
echo
|
||||||
@ -204,7 +207,7 @@ case "$1" in
|
|||||||
echo
|
echo
|
||||||
printf "${LCYAN}Please wait ...${NC}\n"
|
printf "${LCYAN}Please wait ...${NC}\n"
|
||||||
echo
|
echo
|
||||||
pv -tpreb ${filepath} | dd bs=1M of=${DEVICEDIR}/${devname}
|
pv -tpreb ${filepath} | dd bs=${BLOCKSIZE}M of=${DEVICEDIR}/${devname}
|
||||||
echo
|
echo
|
||||||
printf "${YELLOW}Syncing buffers...${NC}\n";sync
|
printf "${YELLOW}Syncing buffers...${NC}\n";sync
|
||||||
echo
|
echo
|
||||||
|
Loading…
x
Reference in New Issue
Block a user