]> git.lizzy.rs Git - plan9front.git/commitdiff
inst: ask to ream the filesystem in mounthjfs
authorcinap_lenrek <cinap_lenrek@gmx.de>
Sat, 11 Aug 2012 11:02:31 +0000 (13:02 +0200)
committercinap_lenrek <cinap_lenrek@gmx.de>
Sat, 11 Aug 2012 11:02:31 +0000 (13:02 +0200)
rc/bin/inst/mounthjfs

index 6be5b4e6f8f0ddf9893616011b6197e50c1e6f9d..7fff7184f63ce833a0c8e2dab030394c20cb12f0 100755 (executable)
@@ -28,12 +28,23 @@ case go
        fsflags=(-m $rd)
        export fsflags
 
+       ream=no
+       if(! ~ $fstype `{fstype $fs})
+               ream=yes
+       prompt -d $ream 'Ream the filesystem?' yes no
+       ream=$rd
+
        log Starting $fstype file server for $fs
        unmount /n/newfs >[2]/dev/null
        echo halt >>/srv/$service.cmd >[2]/dev/null
        rm -f /srv/$service /srv/$service.cmd
 
-       hjfs -n $service $fsflags -Srf $fs
+       if(~ $ream yes){
+               hjfs -n $service $fsflags -Srf $fs
+       }
+       if not {
+               hjfs -n $service $fsflags -Sf $fs
+       }
 
        log Configuring $fstype file server for $fs
        {