# HG changeset patch # User Heiko Schlittermann (JUMPER) # Date 1354135375 -3600 # Node ID 10f684acb3143e3a2ddda10f8eeb171dad205687 # Parent 6dec881621eab66b2db140269711e7afe275f3c9 enhanced the ro() shell function. But it should be replaced by a ro/rw program as soon as possible. diff -r 6dec881621ea -r 10f684acb314 ROOT/root/.bashrc --- a/ROOT/root/.bashrc Wed Jun 20 09:47:49 2012 +0200 +++ b/ROOT/root/.bashrc Wed Nov 28 21:42:55 2012 +0100 @@ -1,6 +1,15 @@ -function ro() { mount -o remount,ro /; } +function ro() { + mount -o remount,ro / + blockdev --setrw /dev/sda1 + PS1="$_OLD_PS1" +} + function rw() { + blockdev --setrw /dev/sda1 mount -o remount,rw / + _OLD_PS1="$PS1" + PS1="[RW] $PS1" + test "$#" = 0 && return; "$@" rc=$? diff -r 6dec881621ea -r 10f684acb314 ROOT/usr/local/sbin/rw.not-yet --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ROOT/usr/local/sbin/rw.not-yet Wed Nov 28 21:42:55 2012 +0100 @@ -0,0 +1,16 @@ +#! /bin/sh + +rc=`mktemp` +cat >>$rc <<_ +test -f $HOME/.bashrc && source $HOME/.bashrc +PS1="[RW] $PS1" +trap "DONE" EXIT +_ + +set-rw / +if [ $# != 0 ]; then + "$@" +else + bash --rcfile $rc +fi +set-ro / diff -r 6dec881621ea -r 10f684acb314 alix.txt.gpg Binary file alix.txt.gpg has changed