Hi, I'm trying to build an rpm that checks at installation time which SME version it's running on. I've put the following code in my SPECS file and it seems to work OK, (at least on my machine :-).
%pre version=`grep -e "^Installing SMEServer" /root/install.log | \ sed "s/Installing SMEServer-//" | \ awk -F - '{print $1}'` if ( [ $version != 5.5 ] && [ $version != 5.6 ] ); then echo "Sorry, this application requires SME 5.5 or 5.6. "Your version is $version" kill 0 > /dev/null fi Is this the best way to do this? It relies on /etc/ to be present, which maybe is not always the case? And what about 'kill 0'? I couldn't figure out an other way to stop the process. All comments are welcome. Michiel -- Please report bugs to [EMAIL PROTECTED] Please mail [EMAIL PROTECTED] (only) to discuss security issues Support for registered customers and partners to [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Searchable archive at http://www.mail-archive.com/devinfo%40lists.e-smith.org