mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-02 01:27:27 -04:00
Merge pull request #16 from crushmaster/master
Added the possibilty to pass a block device to the script as first arg...
This commit is contained in:
14
makeiso.sh
14
makeiso.sh
@ -13,6 +13,7 @@ myUBUNTUISO="ubuntu-14.04.2-server-amd64.iso"
|
|||||||
myTPOTCEISO="tpotce.iso"
|
myTPOTCEISO="tpotce.iso"
|
||||||
myTPOTCEDIR="tpotceiso"
|
myTPOTCEDIR="tpotceiso"
|
||||||
myTMP="tmp"
|
myTMP="tmp"
|
||||||
|
myDEV=$1
|
||||||
|
|
||||||
# Let's create a function for colorful output
|
# Let's create a function for colorful output
|
||||||
fuECHO () {
|
fuECHO () {
|
||||||
@ -65,9 +66,18 @@ isohybrid $myTPOTCEISO
|
|||||||
fuECHO "### Cleaning up."
|
fuECHO "### Cleaning up."
|
||||||
rm -rf $myTMP $myTPOTCEDIR
|
rm -rf $myTMP $myTPOTCEDIR
|
||||||
|
|
||||||
# Done.
|
# Let's write the image to $myDEV or show instructions
|
||||||
fuECHO "### Done."
|
if [ -b $myDEV ] && [ ! -z $1 ]
|
||||||
|
then
|
||||||
|
fuECHO "### Found a block device on $myDEV"
|
||||||
|
fuECHO "### Writing image to device. Please wait..."
|
||||||
|
dd bs=1M if="$myTPOTCEISO" of="$myDEV"
|
||||||
|
else
|
||||||
fuECHO "### Install to usb stick"
|
fuECHO "### Install to usb stick"
|
||||||
fuECHO "###### Show devices: df or fdisk -l"
|
fuECHO "###### Show devices: df or fdisk -l"
|
||||||
fuECHO "###### Write to device: dd bs=1M if="$myTPOTCEISO" of=<path to device>"
|
fuECHO "###### Write to device: dd bs=1M if="$myTPOTCEISO" of=<path to device>"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Done
|
||||||
|
fuECHO "### Done."
|
||||||
exit 0
|
exit 0
|
||||||
|
Reference in New Issue
Block a user