I forgot to send this mail to the list, so here goes..

Torsdag 15 november 2007 12:01, skrev Steffen Kaiser:
> What about a new meta function, say "partition_cmd", that is either a
> script or something like "layout:pri:10GB,boot;ext:all;log:10GB,fat32".
>
> I'm not certain, how to support DOS and Linux boot disks with the script
> path, but the layout: scheme translates to both parted and fdisk easily
> (for parted I have a script already). 

What if we have a file for every choice in the menu similar to how we select 
master and optional .bat scripts to today.
Like this:

-- file one--
:: PARTITION: 14GB for C:  Use remaining disk space for D: 
dd if=/dev/zero of=/dev/dsk bs=512 count=1
parted --script /dev/dsk -- mkpart primary 0 14GB
parted --script /dev/dsk -- mkpart primary 14GB -1s
parted --script /dev/dsk -- rm 1
parted --script /dev/dsk -- mkpart primary 0 4GB
--file one eof --

-- file two --
:: PARTITION: Install on existing First partition, keep the others.
parted --script /dev/dsk -- rm 1
parted --script /dev/dsk -- mkpart primary 0 4GB
--file two eof --

Run every line as a system command.
If something goes wrong ask the user what to do 
(ie: Ignore or Continue. Retrying will probably make no sense, but rechoosing 
from menu could be an idea).
This will make it very clear what we are doing, no 'translation' to obfuscate 
whats going on :-)

As a bonus we get a generalized "choose a file-from-menu system" that takes a 
directory and a search-for-label (ie: MASTER, OPTIONAL or PARTITION) as a 
argument.

> The old "fdisk_cmd" is supported for 
> elder configurations, but "partition_cmd" overrules it if present.

Yes :-)
Keep existing code and functions for backward compability,
and when we get sick of the old stuff sometime in the future , 
it probably will be easy to remove it.

>
> > predosemu_cmd - System command to run before dosemu
> > alt_dosemu_cmd - Alternate System command to run in place of dosemu
> > postdosemu_cmd - System command to run after dosemu
>
> I like them.

Good, I see if I can get more into it next week.
 
>
> I will do the same for the partition_cmd idea ;-)

Nice :-D

-- 
Nils Olav

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
unattended-info mailing list
unattended-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/unattended-info

Reply via email to