John Desmond wrote:
> 
> I've been messing with the weblet logs in
> EigenSteinB2, trying to figure out how to get them to
> show up in the weblet along with messages.log and the
> others. There seem to be some interacting problems
> with this, though.
> 
> If I move the weblet sh-log's into /var/log,
> everything works peachy until the next log rotation,
> at which point the ownership of the files revert to
> root and the weblet can't access them anymore. (One of
> the commands buried in the scripts has a 'preserve'
> option which I think is supposed to keep this from
> happening but it didn't seem to work)
> 
> I tried the reverse, leaving the sh-log's in
> /var/sh-log but don't seem to be able to find a way to
> get the weblet cgi to access the logs in the other
> directory.
> 
> Check this out, though. I tried creating a set of
> symbolic links in /var/log that don't rotate but point
> to the /var/sh-log's and that actually worked great.
> Except...... I lose all the symlinks on a reboot.
> 
> So, has anyone figured out how to do this
> independently? Or can someone point out how to set up
> symlinks during the boot-up?

Here's how I do it; but, bear in mind, this involves re-building
weblet.lrp and ramlog.lrp.  I rebuild many LRP's and also rebuild the CD
image so nothing is on my floppy, except those files required to boot
(e.g., contents of bootdisk.bin.)

First, un-tar weblet.lrp into a temporary directory.

        cd <temp>/var
        rm -fr sh-log
        ln -s /var/log sh-log

At this point, rebuild weblet.lrp from this tree.

I work on a full install Debian system; so, I have no idea how to do
this on your Dachstein system; but, making these changes to your
firewall and lrcfg/backup should also work.

Next, un-tar ramlog.lrp (or, ramdisk.lrp should also work) into a
temporary directory.  I'm not clear what to do if /var/log is *not* on
its own ramdisk.

        cd <temp>/var/log
        rm sh-httpd.log         (it's probably *not* there)
        >sh-httpd.log
        chown 50:4 sh-httpd.log
        chmod 640 *

At this point, rebuild ramlog.lrp from this tree.

Also, as you surmised, you will need to edit
/etc/cron.daily/multicron-d, modifying the call to savelog in the
rotatelogs subroutine:

        savelog -p -c ${lrp_LOGS_DEPTH:-4} $LOG >/dev/null

Of course, etc.lrp requires backup/update for these changes to persist.

What do you think?


P.S.    Charles, *why* isn't ``savelog -p'' the default in Dachstein-CD?  I
cannot figure out any reason to force ownership of everything to
root:adm, as this current configuration does:

        savelog -g adm -m 640 -u root -c ${lrp_LOGS_DEPTH:-4} $LOG >/dev/null

-- 

Best Regards,

mds
mds resource
888.250.3987

Dare to fix things before they break . . .

Our capacity for understanding is inversely proportional to how much we
think we know.  The more I know, the more I know I don't know . . .

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

Reply via email to