Funky-See, Funky-Do (nonInteractive UFS1 specification)

Devin Teske dteske at vicor.com
Tue Aug 3 23:41:04 UTC 2010


On Mon, 2010-08-02 at 18:58 -0700, Garrett Cooper wrote:
> Thought: why not just make the last `column' feed into a program as
> options, like '-j enable -U', '-O1', etc...? Seems a bit more portable
> and tunable ;)...

Well, that wouldn't work because different options need to be sent to
different programs. For example, "-J enable" is an option to tunefs(8)
while "-U" and "-O1" are options to newfs(8).

Although, I do agree with you that it's a bit kludgey to just throw
another column on the configuration data.

After giving it more thought, I think this is a better solution:

--- usr.sbin/sysinstall/label.c.orig    2010-02-19 12:26:30.000000000 -0800
+++ usr.sbin/sysinstall/label.c 2010-08-03 14:24:43.000000000 -0700
@@ -1647,6 +1647,8 @@ diskLabelNonInteractive(Device *dev)
			pi = tmp->private_data = new_part(PART_FILESYSTEM, mpoint, TRUE);
 			tmp->private_free = safe_free;
 			pi->newfs_data.newfs_ufs.softupdates = soft;
+			if (!strcmp(typ, "ufs1"))
+			    pi->newfs_data.newfs_ufs.ufs1 = true;
 		    }
 		}
 	    }

Given the above patch, if one wanted to specify UFS1 as the filesystem
type for non-interactive installation, here's how the configuration file
should look:

disk=/dev/da0
da0s1-1=ufs1 2097152 /    0
da0s1-2=swap 2097152 none 0
da0s1-3=ufs1 2097152 /var 1
da0s1-4=ufs1 2097152 /tmp 1
da0s1-5=ufs1 0       /usr 1

I think I like this much better. The patch is smaller too.
-- 
Cheers,
Devin Teske

-> CONTACT INFORMATION <-
Business Solutions Consultant II
FIS - fisglobal.com
510-735-5650 Mobile
510-621-2038 Office
510-621-2020 Office Fax
909-477-4578 Home/Fax
devin.teske at fisglobal.com

-> LEGAL DISCLAIMER <-
This message  contains confidential  and proprietary  information
of the sender,  and is intended only for the person(s) to whom it
is addressed. Any use, distribution, copying or disclosure by any
other person  is strictly prohibited.  If you have  received this
message in error,  please notify  the e-mail sender  immediately,
and delete the original message without making a copy.

-> END TRANSMISSION <-



More information about the freebsd-sysinstall mailing list