What I also decided to do was have some different folders on my HD, to keep various different configs. It has worked quite well for me so my RFE is this: do the powers to be see any merit for built-in support for the .LRP packages living within a subfolder of the storage partition, instead of the root folder of this partition? I suspect that I'm nearly unique in my desire and employment of this. If not, this following info might be helpful to others...
This is what I found worked (for my Bering 1.2 setup). Please note that I use a separate lrpkg.cfg file, as opposed to the singular syslinux.cfg.
These files /have/ to live in the root of the the storage partition (no simple work-around that I found):
initrd.lrp
ldlinux.sys
linux
lrpkg.cfg
syslinux.cfg
syslinux.dpy
... the only one that _might_ concern you here is initrd.lrp, but even that one is ever-so-rarely changed so it will probably be the same for all your different configs. All the rest of the .LRP files can live within an individualized sub-folder.
So say you have a folder SOME_DIR on your h/d. Here's 1) how to tell LEAF where to find the .LRP files, and 2) how to make backing up happen properly (the tougher part).
1) Simple - have the folder name as part of the .LRP filename within lrpkg.cfg, e.g.:
SOME_DIR/root,SOME_DIR/etc,SOME_DIR/local,SOME_DIR/modules,SOME_DIR/iptables,SOME_DIR/ppp, etc...
2) Make these changes:
a) - to the file /etc/profile add in the lines:
export HD_DIR="SOME_DIR"
mkdir /tmp/$HD_DIR 2>/dev/nul
mkdir /var/lib/lrpkg/$HD_DIR 2>/dev/nul
mkdir /var/lib/lrpkg/$HD_DIR/mnt
cp /var/lib/lrpkg/* /var/lib/lrpkg/$HD_DIR/. 2>/dev/nul- this sets an environment variable so other scripts know what the folder_name is ('export'). It will get set anytime that you login, which you must do before you do a backup! It also makes the necessary folder names and copies the package info to a dedicated folder. This is probably excessive but it's what I settled on and it worked for me.
b) Adjust the backup script, /usr/sbin/lrcfg.back.script:
- Change
INCLUDE="/tmp/INCLUDE"
To
INCLUDE="/tmp/$HD_DIR/INCLUDE" - Change
EXCLUDE=/tmp/EXCLUDE"
To
EXCLUDE="/tmp/$HD_DIR/EXCLUDE" - Change
TMP_EXCLUDE="/tmp/TMP_EXCLUDE"
To
TMP_EXCLUDE="/tmp/$HD_DIR/TMP_EXCLUDE"- Change
cat /var/lib/lrpkg/*.list /var/lib/lrpkg/*.links >>$TMP_EXCLUDE
To
cat /var/lib/lrpkg/$HD_DIR/*.list /var/lib/lrpkg/$HD_DIR/*.links >>$TMP_EXCLUDE
- Below
[ "$PACKAGE" = "root" ] && cat $TMP_EXCLUDE > $EXCLUDE
Add
[ "$PACKAGE" = "$HD_DIR/root" ] && cat $TMP_EXCLUDE > $EXCLUDE
That should be it. I agree, my use of $HD_DIR beneath /var/lib/lrpkg, etc, is probably unnecessary but it's where I ended up.
A precautionary tale: Backup your .LRP packages elsewhere before trying this. If something's amiss you may overwrite a valid .LRP package with an empty one. The way I verify I'm setup properly is that the 'C'onfirm Writes=On, and when I backup a .LRP I verify that the new package is about the same size as the old one.
How to make it all easy to change between different configs: The only thing different, from a boot-up standpoint, is that I have various lrpkg.XXX files in my root folder, and copy them over the lrpkg.cfg file to tell LEAF where my current setup is. After a new setup boots up I have to change the HD_DIR var within /etc/profile, save the file (but don't backup yet), re-login (so the updated HD_DIR is now live) ... then I can go in and backup my LEAF packages.
I created some scripts to:
- mount the h/d
- copy over the adjusted lrpkg.XXX file onto \lrpkg.cfg
- unmount the h/d
- rebootand voila! I have a quick & easy way to switch between different configs. It's really, really nice & sweet, once it's setup.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
I tried to make the HD_DIR issue invisible to LEAF by mucking with syslinux.cfg but got no success. Specifically, what doesn't work (or at least not for me):
Within syslinux.cfg, trying something like:
default... init=/SOME_DIR/linuxrc ...
or
default... boot=/dev/hda1/SOME_DIR:msdos ...
or
default... PKGPATH=/dev/hda1/SOME_DIR ...
My experience was that all these options had to point to the root of a partition (or rather, a partition 'proper' if you prefer).
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
So, is there any interest in the LEAF developers to include subfolder support for storing .LRP packages? I'd spend some time to streamline my solution if it makes it more attractive for inclusion.
Thanks to the LEAF community, and especially the developers!
scott; canada
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
------------------------------------------------------------------------
leaf-user mailing list: [EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-user
SR FAQ: http://leaf-project.org/pub/doc/docmanager/docid_1891.html
