Date: Sat, 14 Nov 1998 23:03:52 +0000 (GMT) From: Terry Lambert <tlambert@primenet.com> To: sgk@troutmask.apl.washington.edu (Steve Kargl) Cc: tlambert@primenet.com, jb@cimlogic.com.au, crossd@cs.rpi.edu, jkh@time.cdrom.com, nate@mt.sri.com, hackers@FreeBSD.ORG Subject: Re: linux software installation and uname Message-ID: <199811142303.QAA25590@usr02.primenet.com> In-Reply-To: <199811112316.PAA03393@troutmask.apl.washington.edu> from "Steve Kargl" at Nov 11, 98 03:16:17 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> Well, I started the thread, so here goes. It isn't that simple,
> the script also checks to see that it was executed from /cdrom/x86-1.7/linux.
> You can work around that I suppose once you find all the dependency.
Or even ignoring the dependency as being irrelevent to the issue:
#!/bin/sh
# assume failure...
PRESTATUS="FAIL"
preinstall()
{
echo "PREINSTALL started"
if [ -d /cdrom ]
then
echo "renaming /cdrom; we need a work directory named /cdrom"
mv /cdrom /cdrom-linux-was-here
fi
mkdir /cdrom
mount /dev/cd0a /mnt
cd /mnt
echo "copying install image to writeable hierarchy for patching"
tar cf - . | (cd /cdrom ; tar xvf -)
unount /mnt
echo "patching the bejesus out of things..."
# Oh, look, a patch that, if sent to the vendor, would make
# the next CDROM install on FreeBSD as well as Linux, without
# all the hoopla...
patch <<PATCHEOF
yadda yadda yadda...
- if [ "$UNAME" = "Linux" ]
+ if [ "$UNAME" = "Linux" -o "$UNAME" = "FreeBSD" ]
PATCHEOF
if "$?" = "0"
then
echo "patching completed successfully"
PRESTATUS="OK"
else
ecoh "patching failed; sorry"
fi
echo "PREINSTALL complete"
}
postinstall()
{
cd /
echo "POSTINSTALL started"
echo "cleaning up wrietable hierarchy"
rm -rf /cdrom
if [ -d /cdrom-linux-was-here ]
then
echo "restoring old /cdrom; thanks for the work directory"
mv /cdrom-linux-was-here /cdrom
fi
echo "POSTINSTALL complete"
}
echo "INSTALLATION started"
# preinstallation garbage
preinstall
if [ "$PRESTATUS" = "FAIL" ]
then
# failed preinstall for whatever reason...
echo "INSTALLATION aborting"
else
# preinstall successful; now we do everything that doesn't
# bear on the installation environment, only on whether or
# how far the vendor install gets...
echo "INSTALLATION proceeding"
echo "VENDORINSTALL started"
sh /cdrom/x86-1.7/linux
echo "VENDORINSTALL complete"
fi
# postinstallation garbage; must call if error, as well, so not in
# the "if" block, above...
postinatall
echo "INSTALLATION complete"
exit 0
> Next, you need to specify where the libgcc and libf2c for linux live.
/compat/linux/usr/lib
> This can be fixed after the install. There other idiosyncracies that
> need to be adjusted.
Yeah, so? That's why there are software engineers.
Terry Lambert
terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199811142303.QAA25590>
