source: bootcd/iso2usb @ 0105685

gcc484ntopperl-5.22
Last change on this file since 0105685 was c5c522c, checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago

initial commit, transferred from cleaned syn3 svn tree

  • Property mode set to 100755
File size: 827 bytes
Line 
1#!/bin/bash
2    ISO=$1
3    DISC=$2
4    PART=$DISC""1
5    MNT="/tmp/cdmnt"
6
7    if ! [ "$ISO" ]; then
8        echo "Kopieerd een Syn-3 installer ISO naar bootable usb stick."
9        echo "Usage:"
10        echo " $0 iso/latest.iso /dev/sdc"
11        exit 1
12    fi
13    [ "$DISC" ] || exit 1
14
15    failed()
16    {
17        umount $MNT &>/dev/null
18
19        echo "Copy of installer failed!"
20        echo "Press enter to continue..."
21        read
22        exit 1
23    }
24
25
26
27    mkdir $MNT &>/dev/null
28    umount $MNT &>/dev/null
29
30    REMOVABLE=/sys/block/`echo $DISC|sed s#.*/##`/removable
31    if [ "`cat $REMOVABLE`" != "1" ]; then
32        echo "EY KIJK JE WEL FF UIT?? $DISC IS GEEN REMOVABLE DEVICE? :)"
33        exit 1
34    fi
35
36    mount -o loop $ISO $MNT || failed
37
38    pushd ../install
39    sh ./copyinstaller.sh $MNT $DISC || failed
40    popd
41   
42    umount $MNT
43
Note: See TracBrowser for help on using the repository browser.