K.-P. Kirchdörfer wrote:

Charles;

I may have found another small problem:

firewall# lrpkg -i squid-2.lrp
Installing squid-2 ... cat: /var/lib/lrpkg//boot.fstype: No such file or
directory
Done.

I was told:
It could be a bug (from the lrpkg script):
echo "$fn=-t `cat $lrpkgpath/boot.fstype` $d">>"$lrpkgpath/backdisk"


but boot.fstype is obsoleted with new linuxrc.
Any idea how to solve?

This is a known bug. The error message is effectively harmless, and only appears when manually installing packages.


The result of this bug is you must manually specify the backup disk when first backing up a package you manually installed (which you'd probably have to do anyway), rather than having it default to the (no longer existing) /dev/boot device.

Assuming using the first entry in pkgpath.disks in place of the missing boot device/fs info is acceptable, the following will fix the problem:

> echo "$fn=-t `cat $lrpkgpath/boot.fstype` $d">>"$lrpkgpath/backdisk"

Replace with (all one line):
echo "$fn=-t `sed -n '\:'$d':{s/^.* //;p;}' $lrpkgpath/pkgpath.disks`" >>"$lrpkgpath/backdisk"


A bit above this, the handling of $d needs to be tweaked as well:

Was:
if [ -z "$2" ]; then
    local d="`sed 's/.*boot=/\1/; s/[: ].*//' /proc/cmdline`"
else

Replace with:
if [ -z "$2" ]; then
    local d="`sed -n '1{s/ .*$//;p;}' $lrpkgpath/pkgpath.disks`"
else

The (unused) mount.boot procedure should be removed.

...and finally, the mount.back procedure should be tweaked:

Was:
if [ "$dev" = "" ]; then
    mount -t `cat /var/lib/lrpkg/boot.fstype` /dev/boot "$2"
else

Replace with (between if/else is one line):
if [ "$dev" = "" ]; then
mount -t `sed -n '1{s/\([^ ].*\) \(.*\)$/\2 \1/;p;}' $lrpkgpath/pkgpath.disks` "$2"
else


Of course, it wouldn't hurt to s:/var/lib/lrpkg:$lrpkgpath: on the whole file, to remove any remaining absolute references to the package directory.

NOTE: Mods above have been briefly tested for correct shell quoting and functionality, but no guarantee is expressed or implied!

--
Charles Steinkuehler
[EMAIL PROTECTED]



-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to
deliver higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3

_______________________________________________
leaf-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-devel

Reply via email to