Hi! I noticed that you are in the process of migrating the code to svn. Earlier, I was going to ask whether you were doing this for real, or only toying around with the idea. After reading the -devel archives, it seems that this is an actuality.
I have been busy in the last few months preparing for a new release of paella, and I haven't had time to work with unattended. I just made a release last week, so I'm going to be able to concentrate on this a bit more. I haven't had a chance to upgrade to 4.8 yet, but I will pretty shortly, as I really value the ability to use a postgresql database (paella also uses it, and that makes it easier to integrate the two together). I have just finished making a trait for unattended, which is installed along with the paella-installer, and it seems to work pretty well, so far. I have yet to automate the unattended install, so I have to run "sudo /etc/master" once the machine boots up, but using the live image has been very convenient. The live image uses the nt5x-install script exclusively, and there is no support for using the dosemu method. I've noticed that in order for the nt install script to work, it uses some ntldr_boot_code* files. I would like to know where these files come from, if they are bound by a license, and if I'm free to redistribute those files. I don't know if it will help or not, but I took the liberty of modifying the script-update script in the tools/ directory to use the new svn repository. Feel free to modify it according to your tastes. Errors aren't handled very well yet, and I don't know how you would want to tread errors in the script, so I refrained from attempting to handle them. I used svn export on the assumption that the scripts directory may not be a working copy, although it should work fine, even if it is. -- Thanks: Joseph Rawson
Index: install/tools/script-update =================================================================== --- install/tools/script-update (revision 2986) +++ install/tools/script-update (working copy) @@ -26,27 +26,58 @@ #exceptions=( "win2ksp4-updates.bat" "win2ksp4-symbols.bat" ) exceptions=( ) -# HTTP-Link to the cvs-repository -CVSLINK="http://unattended.cvs.sourceforge.net/unattended/unattended/install/scripts" +get_checksum () { + # retrieve Checksum field from svn info (md5) + svn info $1 | $GREP ^Checksum | $AWK '{print $2}' +} +get_local_md5sum () { + # perform md5sum on file and return just the hash + $MD5SUM $1 | $AWK '{print $1}' +} + + +check_file () { + # perform md5sum on file and compare to svn info + [ `get_checksum $1` = `get_local_md5sum $2` ] +} + +export_script () { + $SVN export $SVNEXPORTOPTS $SVNURL/$1 $1.tmp + if check_file $1 $1.tmp ; then + echo "$1 is OK" + else + echo "$1.tmp is incorrect, removing" + rm -f $1.tmp + fi + if ! [ -e $1.orig ]; then + $MV $1 $1.orig + else + echo "$1.orig already exists, not replacing" + fi + $MV $1.tmp $1 +} + +# scripts directory in svn trunk +SVNURL="https://unattended.svn.sourceforge.net/svnroot/unattended/trunk/install/scripts" +SVNEXPORTOPTS="-q" + # paths to needed programs WGET=$(which wget) FIND=$(which find) GREP=$(which grep) SORT=$(which sort) +MD5SUM=$(which md5sum) +SVN=$(which svn) +AWK=$(which awk) +MV=$(which mv) # Change to the scripts directory so paths are correct cd "$(dirname "$0")"/../scripts - -# crawl through the script-dir -for file in $($FIND . -type f | $GREP -v CVS | $SORT) + +for filename in $($FIND . -type f | $GREP -v \\.svn | $SORT) do - if [[ "${exceptio...@]%%${file##./}}" != "${exceptio...@]}" ]]; then continue; fi - if $WGET --output-document "$file.$$.tmp" $CVSLINK/$file?revision=HEAD - then - mv "$file.$$.tmp" "$file" - else - rm -f "$file.$$.tmp" - fi + if [[ "${exceptio...@]%%${file##./}}" != "${exceptio...@]}" ]]; then continue; fi + export_script $filename done
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------------ OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________ unattended-devel mailing list unattended-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/unattended-devel