Order of rc file execution

2005-12-16 Thread Helge Preuss

Hello,

I use a GBDE-encrypted /var partition which i attach and mount during 
boot in rc.local. Now this has worked flawlessly until my last 
portmanager -u run, after which the following happens during the boot 
sequence:


- /etc/rc.d/ldconfig writes /var/run/ld.so.hints and 
/var/run/ld-elf.so.hints

- /etc/rc.d/local attaches and mounts my encrypted /var partition
- every subsequent program fails to start up because it cannot find any 
dynamic library it needs due to the hidden /var/run/ld*.so.hints


As an ugly workaround i copied the ld*.so.hints to the encrypted 
/var/run, but obviously it is better to run /etc/rc.d/local before 
/etc/rc.d/ldconfig. I understand I can achieve this by changing the line


   # BEFORE:  LOGIN

in local to

   # BEFORE:  ldconfig

and change the REQUIRE line too to avoid a circular dependency.

I'd just like to ask the list whether there is a way which does not 
require changing system-supplied scripts. I'd prefer making my edits in 
a centralized way (for instance, editing something like /etc/rc.local) 
instead of something under rc.d.


Thanks

Helge

--
Helge Preuss
Freelance Software Developer
+49 177 2262 484
[EMAIL PROTECTED]

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Order of rc file execution

2005-12-16 Thread Erik Norgaard

Helge Preuss wrote:

I use a GBDE-encrypted /var partition which i attach and mount during 
boot in rc.local.


why don't you use /etc/rc.d/gbde? (btw, which version of FBSD?).

As an ugly workaround i copied the ld*.so.hints to the encrypted 
/var/run, but obviously it is better to run /etc/rc.d/local before 
/etc/rc.d/ldconfig. I understand I can achieve this by changing the line


   # BEFORE:  LOGIN

in local to

   # BEFORE:  ldconfig

and change the REQUIRE line too to avoid a circular dependency.

I'd just like to ask the list whether there is a way which does not 
require changing system-supplied scripts. I'd prefer making my edits in 
a centralized way (for instance, editing something like /etc/rc.local) 
instead of something under rc.d.


Option 1: seems to be use /etc/rc.d/gbde to mount your /var

Option 2: seems to be create your script under /etc/rc.d with the 
desired BEFORE line.


This doesn't change system supplied scripts, but when you do mergemaster 
then you will be asked if you want  to delete this stale script.


Cheers, Erik

--
Ph: +34.666334818  web: www.locolomo.org
S/MIME Certificate: www.daemonsecurity.com/ca/8D03551FFCE04F06.crt
Subject ID:  9E:AA:18:E6:94:7A:91:44:0A:E4:DD:87:73:7F:4E:82:E7:08:9C:72
Fingerprint: 5B:D5:1E:3E:47:E7:EC:1C:4C:C8:3A:19:CC:AE:14:F5:DF:18:0F:B9
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Order of rc file execution

2005-12-16 Thread Helge Preuss


I use a GBDE-encrypted /var partition which i attach and mount during 
boot in rc.local.



why don't you use /etc/rc.d/gbde? (btw, which version of FBSD?).


Heh, because I didn't know about it! Thanks, this looks like the 
cleanest solution.


How do I use this script? If I interpret the source correctly, I should 
just set

   gbde_devices-auto=AUTO
in /etc/rc.conf and enter my encrypted partition in the fstab?

Dummy question: Where should I look to find documentation about scripts 
like this? I haven't found it mentioned in either the handbook or the 
manpages.


BTW, I use 5.4.



As an ugly workaround i copied the ld*.so.hints to the encrypted 
/var/run, but obviously it is better to run /etc/rc.d/local before 
/etc/rc.d/ldconfig. I understand I can achieve this by changing the line


   # BEFORE:  LOGIN

in local to

   # BEFORE:  ldconfig

and change the REQUIRE line too to avoid a circular dependency.

I'd just like to ask the list whether there is a way which does not 
require changing system-supplied scripts. I'd prefer making my edits 
in a centralized way (for instance, editing something like 
/etc/rc.local) instead of something under rc.d.



Option 1: seems to be use /etc/rc.d/gbde to mount your /var

Option 2: seems to be create your script under /etc/rc.d with the 
desired BEFORE line.


This doesn't change system supplied scripts, but when you do 
mergemaster then you will be asked if you want  to delete this stale 
script.


Cheers, Erik


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Order of rc file execution

2005-12-16 Thread Erik Norgaard

Helge Preuss wrote:


I use a GBDE-encrypted /var partition which i attach and mount during 
boot in rc.local.


why don't you use /etc/rc.d/gbde? (btw, which version of FBSD?).


Heh, because I didn't know about it! Thanks, this looks like the 
cleanest solution.


How do I use this script? If I interpret the source correctly, I should 
just set

   gbde_devices-auto=AUTO
in /etc/rc.conf and enter my encrypted partition in the fstab?

Dummy question: Where should I look to find documentation about scripts 
like this? I haven't found it mentioned in either the handbook or the 
manpages.


I don't know. It might not be documented so well yet, but there's an rc 
mailing list, try search the archive:


  http://lists.freebsd.org/pipermail/freebsd-rc/

Cheers, Erik
--
Ph: +34.666334818  web: www.locolomo.org
S/MIME Certificate: www.daemonsecurity.com/ca/8D03551FFCE04F06.crt
Subject ID:  9E:AA:18:E6:94:7A:91:44:0A:E4:DD:87:73:7F:4E:82:E7:08:9C:72
Fingerprint: 5B:D5:1E:3E:47:E7:EC:1C:4C:C8:3A:19:CC:AE:14:F5:DF:18:0F:B9
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Order of rc file execution [solved]

2005-12-16 Thread Helge Preuss

Erik Norgaard wrote:


Helge Preuss wrote:



I use a GBDE-encrypted /var partition which i attach and mount 
during boot in rc.local.



why don't you use /etc/rc.d/gbde? (btw, which version of FBSD?).



Heh, because I didn't know about it! Thanks, this looks like the 
cleanest solution.


How do I use this script? If I interpret the source correctly, I 
should just set

   gbde_devices-auto=AUTO
in /etc/rc.conf and enter my encrypted partition in the fstab?


Actually, the variable ${gbde_devices-auto} in /etc/rc.d/gdbe is almost 
certainly a typo. I changed it to ${gbde_devices_auto}.

Additionally, one has to set
   gbde_lock_[device]=/path/to/lockfileor
   gbde_lockdir=/path/to/lockdir   [where the lockfile(s) must 
have the encrypted slice's name and a '.lock' extension

in /etc/rc.conf.
Having done this, i have a solution for mounting encrypted partition at 
boot, which seems perfectly clean to me. Wonderful.




Dummy question: Where should I look to find documentation about 
scripts like this? I haven't found it mentioned in either the 
handbook or the manpages.



I don't know. It might not be documented so well yet, but there's an 
rc mailing list, try search the archive:


  http://lists.freebsd.org/pipermail/freebsd-rc/

Cheers, Erik




--
Helge Preuss
Freelance Software Developer
+49 177 2262 484
[EMAIL PROTECTED]

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]