source: hybrid/branches/releng-11/nanobsd/files/tools/cfedit@ 13736

Last change on this file since 13736 was 13721, checked in by rick, 8 years ago

Re-mounting read-only takes longer these days.

See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=176169 for explanation
why and how-to work-around if needed.

  • Property svn:executable set to *
File size: 543 bytes
Line 
1#!/bin/sh -
2#
3# Toggle writable state of the disk
4#
5# Rick van der Zwet <rick@wirelessleiden.nl>
6#
7
8
9mount -p | awk '{if($2 == "/"){ print $4}}' | grep -q ro && {
10 mount -uwo noatime /
11 mount -wo noatime /cfg
12 echo "# / - write"
13 echo "# /cfg - write"
14 echo "# Run again to protect"
15 } || {
16 echo "# Please wait, it takes between 30-60 seconds to"
17 echo "# remount partition disk read-only again"
18 mount -ur /
19 umount /cfg
20 echo "# / - read"
21 echo "# /cfg - ejected"
22 echo "# Run again to edit"
23 }
24
Note: See TracBrowser for help on using the repository browser.