source: hybrid/branches/releng-9.0/nanobsd/files/tools/cfedit@ 10841

Last change on this file since 10841 was 10604, checked in by rick, 13 years ago

This little gem is only usefull for those hacking on the CF cards all the time.

  • Property svn:executable set to *
File size: 431 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 mount -ur /
17 umount /cfg
18 echo "# / - read"
19 echo "# /cfg - ejected"
20 echo "# Run again to edit"
21 }
22
Note: See TracBrowser for help on using the repository browser.