Subject: Re: mkisofs file size limit
To: None <tech-pkg@netbsd.org>
From: Frederick Bruckman <fredb@immanent.net>
List: tech-pkg
Date: 03/15/2005 15:00:01
In article <20050315143916.GA26695@azenomei.knuffel.net>,
	Rhialto <rhialto@azenomei.knuffel.net> writes:
> On Tue 15 Mar 2005 at 01:53:33 +0000, Frederick Bruckman wrote:
>> I suppose not. You could write a file directly to the raw partition using
>> "growisofs". E.g. "growisofs -Z /dev/rcd0d=dumpfile".  To use that with
>> "dump -B" would required some clever scripting.
> 
> Not much clever scripting needed. I use this (not on i386, so the raw
> partition is c):
> 
> #!/bin/sh
> unset SUDO_COMMAND
> size="-B $(( 4482 * 1024 ))"
> writecommand="growisofs -Z /dev/rcd0c=/dev/stdin"
> 
> ask_and_dump() {
>     partition=$1
>     read -p "Type yes to start level 1 dump of $partition: " answer
>     case $answer in
>         [Yy]*)
>             dump -1 -u $size -f - $partition  | $writecommand 
>             ;;
>         *)
>             echo "$partition skipped..."
>             ;;
>     esac
> }
> 
> ask_and_dump "/home"
> ask_and_dump "/usr"

What happens when "dump" prompts for a volume change? I would have
guessed that "growisofs" would just exit, and that you would need
to pipe to a while loop that restarts it after giving you an opportunity
to put in a new blank disk.


Frederick