On Tue, 2009-02-03 at 09:39 -0500, Stefan Monnier wrote: > > ln -sf /rom/etc/init./boot /etc/init.d/boot
Hrm. But in my case, those files are effectively the same (where
hotplug counts). See:
# diff -u /rom/etc/init.d/boot /etc/init.d/boot
--- /rom/etc/init.d/boot Mon Jun 16 23:08:04 2008
+++ /etc/init.d/boot Fri Jul 11 00:16:00 2008
@@ -20,8 +20,12 @@
config_get log_ip "$cfg" log_ip
config_get log_size "$cfg" log_size
# but what if we want to use syslog-ng here?
- syslogd -C${log_size:-16} ${log_ip:+-L -R $log_ip}
- klogd
+ if [ -x /etc/init.d/syslog-ng ]; then
+ /etc/init.d/syslog-ng start
+ else
+ syslogd -C${log_size:-16} ${log_ip:+-L -R $log_ip}
+ klogd
+ fi
}
As you can see, the only difference is in regard to a local patch I have
for syslog/syslog-ng handling.
> I think the first is started in /etc/preinit.
Yeah, there are a number of calls to hotplug2 in there.
> Starting it twice is fairly normal: once in the "initramfs" (aka
> "miniroot" in Irix parlance) before the real rootfs is mounted, and once
> after the real rootfs is mounted.
But only one of them is actually active, yes? Why keep a second one
around consuming RAM if it's been superseded and doing nothing?
> The "killall hotplug2" was moved a little while ago from one place to
> another, so if the two rootfs aren't in sync, the first hotplug2 doesn't
> get killed.
Hrm.
> > So something like:
>
> > [ "$FAILSAFE" = "true" ] && touch /tmp/.failsafe
>
> > + killall -q hotplug2
> > [ -x /sbin/hotplug2 ] && /sbin/hotplug2 --override --persistent \
> > --max-children 1 --no-coldplug &
>
> Yes.
I guess I wonder why, even without an externally mounted rootfs, this
issue of having two hotplug2s running is not being addressed.
The patch should look more like:
@@ -50,8 +55,11 @@
[ "$FAILSAFE" = "true" ] && touch /tmp/.failsafe
killall -q hotplug2
- [ -x /sbin/hotplug2 ] && /sbin/hotplug2 --override --persistent \
+ [ -x /sbin/hotplug2 ] && {
+ killall -q hotplug2
+ /sbin/hotplug2 --override --persistent \
--max-children 1 --no-coldplug &
+ }
# the coldplugging of network interfaces needs to happen later, so we
do it manually here
for iface in $(awk -F: '/:/ {print $1}' /proc/net/dev); do
to be really safe about it (i.e. only kill the existing one if there is
one available to replace it). But indeed, it works -- for the limited
use case I have tested for so far. ;-)
> Try a diff, and you'll probably get something very similar to your above
> suggested patch.
I did. See above.
b.
signature.asc
Description: This is a digitally signed message part
_______________________________________________ openwrt-devel mailing list [email protected] http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
