summaryrefslogtreecommitdiff
path: root/scripts/install.sh
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2011-05-06 06:05:30 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2011-05-06 06:05:30 +0200
commitc41c00e2a31648f18c183261eb9f3324c10bf03c (patch)
treeaf20684f7926ed23aa1ed03b087778697038b866 /scripts/install.sh
parent7de0af6d17ba07beb89115776f94a306da702b6a (diff)
add no format option
Diffstat (limited to 'scripts/install.sh')
-rwxr-xr-xscripts/install.sh12
1 files changed, 7 insertions, 5 deletions
diff --git a/scripts/install.sh b/scripts/install.sh
index 7b3b5bc4d..1224319ae 100755
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#-
-# Copyright © 2010
+# Copyright © 2010, 2011
# Waldemar Brodkorb <wbx@openadk.org>
# Thorsten Glaser <tg@mirbsd.org>
#
@@ -70,6 +70,7 @@ TOPDIR=$(realpath .)
ostype=$(uname -s)
cfgfs=1
+noformat=0
quiet=0
serial=0
speed=115200
@@ -78,13 +79,13 @@ panicreboot=10
function usage {
cat >&2 <<EOF
Syntax: $me [-c cfgfssize] [-p panictime] [±q] [-s serialspeed]
- [±t] /dev/sdb image
+ [±t] -n /dev/sdb image
Defaults: -c 1 -p 10 -s 115200; -t = enable serial console
EOF
exit $1
}
-while getopts "c:hp:qs:t" ch; do
+while getopts "c:hp:qs:nt" ch; do
case $ch {
(c) if (( (cfgfs = OPTARG) < 0 || cfgfs > 5 )); then
print -u2 "$me: -c $OPTARG out of bounds"
@@ -102,6 +103,7 @@ while getopts "c:hp:qs:t" ch; do
exit 1
fi
speed=$OPTARG ;;
+ (n) noformat=1 ;;
(t) serial=1 ;;
(+t) serial=0 ;;
(*) usage 1 ;;
@@ -330,9 +332,9 @@ fi
(( quiet )) || print "Creating ext2fs on ${part}..."
q=
(( quiet )) && q=-q
-mke2fs $q "$part"
+(( noformat )) || mke2fs $q "$part"
partuuid=$(tune2fs -l "$part" | sed -n '/^Filesystem UUID:[ ]*/s///p')
-tune2fs -c 0 -i 0 "$part"
+(( noformat )) || tune2fs -c 0 -i 0 "$part"
(( quiet )) || print Extracting installation archive...
mount_ext2fs "$part" "$T"