summaryrefslogtreecommitdiff
path: root/rc/bin/pc/setup.9fat
diff options
context:
space:
mode:
authorTaru Karttunen <taruti@taruti.net>2011-03-30 17:14:36 +0300
committerTaru Karttunen <taruti@taruti.net>2011-03-30 17:14:36 +0300
commit2959e1ede0ebc6fdffd7b8660f43c2ce14c9696f (patch)
treef6343b1ce11a8c87251dd27cf3d3e26b50693fa7 /rc/bin/pc/setup.9fat
parente463eb40363ff4c68b1d903f4e0cdd0ac1c5977f (diff)
downloadplan9front-2959e1ede0ebc6fdffd7b8660f43c2ce14c9696f.tar.xz
Import sources from 2011-03-30 iso image - rc
Diffstat (limited to 'rc/bin/pc/setup.9fat')
-rwxr-xr-xrc/bin/pc/setup.9fat33
1 files changed, 33 insertions, 0 deletions
diff --git a/rc/bin/pc/setup.9fat b/rc/bin/pc/setup.9fat
new file mode 100755
index 000000000..a6f470316
--- /dev/null
+++ b/rc/bin/pc/setup.9fat
@@ -0,0 +1,33 @@
+#!/bin/rc
+
+rfork e
+if(! ~ $#* 2) {
+ echo 'usage: setup.9fat /dev/sdC0/9fat plan9.ini' >[1=2]
+ exit usage
+}
+
+. /rc/bin/pc/defs
+fat=$1
+ini=$2
+if(! test -f $fat) {
+ echo fat partition not found >[1=2]
+ exit fat
+}
+if(! test -f $ini) {
+ echo plan9.ini not found >[1=2]
+ exit ini
+}
+
+if(pc/isfat $fat) {
+ echo 'Already a FAT partition in '^$fat^'; ream it?'
+ prompt 'ream 9fat' y n
+ switch($rd) {
+ case n
+ exit
+ }
+}
+
+disk/format -r 2 -d -b /386/pbs $fat /386/9load /386/9pcdisk
+mount -c /srv/dos /n/9fat $fat
+cp $ini /n/9fat/plan9.ini
+unmount /n/9fat