On Mon, 2009-08-10 at 19:40 -0700, Victor McAllister wrote:
> On Mon, 2009-08-10 at 09:27 -0700, Mike Noyes wrote:
> >> You can obtain a write protect hardware option fairly easy now. It's not
> >> like it was seven years ago, when a hardware hack (ADM module using the
> >> LD017 controller chip) was necessary. 
> >>
> >> http://reviews.cnet.com/usb-flash-drives/?filter=502909_14791771_
> >>     
> Write protected hardware requires physical access to the LEAF box.

Victor,
Indeed.

>  A software write protect has the advantage that you can set and unset
>  the read and write access to the boot media with putty, ssh. I use two
>  scripts loaded by local.lrp. Granted this is a little cumbersome
>  because you have to keep a copy of  three modules on your desktop
>  machine and scp / winscp them over as needed. If you command a reboot,
>  the machine is restored to read write status since the scripts are
>  only run manually via ssh.

Please commit your script to our cvs repository. Thanks.


> **************
> #! /bin/ash
> # rm-ide by Victor McAllister
> # This script removes modules to prevent
> # access to the boot media - CF ide disk
> echo
> 
> MODULES="ide-disk ide-detect ide-core"
> BOOTDIR="/boot/lib/modules"
> LIBDIR="/lib/modules"
> 
> for MODULE in ${MODULES}
> do
>     rmmod ${MODULE}
>     rm ${BOOTDIR}/${MODULE}.o
>     rm ${LIBDIR}/${MODULE}.o
> done
> echo
> echo "The modules needed for IDE access are not plugged into"
> echo "the kernel or located in the TWO modules directories."
> echo
> echo "The Compact Flash is NOT accessible."
> 
> ########
> 
> #! /bin/sh
> # load-ide by Victor McAllister
> #
> echo "Ths script installs ide modules to access Compact Flash"
> echo "First copy the files ide-core.o ide-dectect.o ide-disk.o"
> echo "using SCP to the /lib/modules directory."
> echo
> 
> MODULES="ide-core ide-detect ide-disk"
> LIBDIR="/lib/modules"
> BOOTDIR="/boot/lib/modules"
> 
> for MODULE in ${MODULES}
>  do
>     insmod ${MODULE}
>     cp ${LIBDIR}/${MODULE}.o ${BOOTDIR}/${MODULE}.o
> 
>  done
>  
> if (lsmod | grep ide-)
>    then
>   
> echo
> echo "Mount the CF possibly using:  mount -t msdos /dev/hda1 /mnt"
> echo
> echo "modules necessary are also in  /boot/lib/modules"
> echo "for possible backing up your configuration."
> 
>    else
> echo
> echo "IDE modules not loaded - CF drive not accessible."
> echo "Did you forgot to SCP the files to /lib/modules?"
>    fi
>   
> #######

-- 
Mike Noyes <mhnoyes at users.sourceforge.net>
http://sourceforge.net/users/mhnoyes/
SF.net Projects:  leaf, sourceforge/sitedocs



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
------------------------------------------------------------------------
leaf-user mailing list: leaf-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-user
Support Request -- http://leaf-project.org/

Reply via email to