IRC log for #elinux on 20080610

02:00.55*** join/#elinux btraynor (n=btraynor@gromit.mixdown.ca)
02:27.32*** join/#elinux dijenerate (n=dijenera@65.48.153.61)
02:59.49*** join/#elinux landley (n=landley@cpe-70-116-30-223.austin.res.rr.com)
07:07.18*** join/#elinux fsvend (i=c296d406@gateway/web/ajax/mibbit.com/x-9897919e9c06d737)
07:17.46*** join/#elinux cbrake_away (n=cbrake@69.34.21.229)
08:23.28*** join/#elinux lyakh (n=lyakh@p57BD2064.dip0.t-ipconnect.de)
08:24.46*** join/#elinux AD-N770 (n=jep@nat/fluendo/x-3b4269ca5fe6e15c)
10:12.15*** join/#elinux AD-N770 (n=jep@nat/fluendo/x-47f8112a63cbf8a0)
12:07.35*** join/#elinux sjhill (n=sjhill@real.realitydiluted.com)
12:20.53*** join/#elinux GPSFan (n=kenm@12.10.255.246)
12:33.06*** join/#elinux svolpe (n=Gerrath_@unaffiliated/gerrath)
12:59.40*** join/#elinux svolpe (n=Gerrath_@unaffiliated/gerrath)
13:08.17*** join/#elinux RobotGuy (n=robotguy@dsl093-038-072.pdx1.dsl.speakeasy.net)
13:22.28*** join/#elinux prpplague (n=dave@mail.americanmicrosystems.com)
13:23.15*** join/#elinux svolpe (n=Gerrath_@unaffiliated/gerrath)
15:05.31*** join/#elinux lyakh (n=lyakh@p57BD2064.dip0.t-ipconnect.de)
15:05.31*** join/#elinux _bob_ (n=bob@70.230.165.110)
15:06.01*** join/#elinux TimRiker (n=timr@70-1-14-72.area1.spcsdns.net)
15:06.01*** mode/#elinux [+o TimRiker] by ChanServ
15:31.43*** join/#elinux markl_ (n=mark@c-24-10-191-137.hsd1.co.comcast.net)
16:07.45*** join/#elinux TimRiker (n=timr@pdpc/supporter/bronze/TimRiker)
16:07.45*** mode/#elinux [+o TimRiker] by ChanServ
16:21.09*** join/#elinux Xires (n=Xires@75.134.59.220)
16:50.02*** join/#elinux svolpe (n=Gerrath_@unaffiliated/gerrath)
17:42.55*** join/#elinux svolpe (n=Gerrath_@unaffiliated/gerrath)
18:02.35*** join/#elinux ico2 (n=ico2@modem-1502.cougar.dialup.pol.co.uk)
18:03.24*** join/#elinux Redhatter (n=vk4fsjl@2001:388:f000:0:0:0:0:279)
18:33.54*** join/#elinux ico2 (n=ico2@modem-3499.chimpanzee.dialup.pol.co.uk)
18:36.38*** join/#elinux RobotGuy (n=robotguy@dsl093-038-072.pdx1.dsl.speakeasy.net)
18:45.19*** join/#elinux mnemoc (n=amery@yoda.expert-erp.net)
18:46.14mnemochi, there is any "standard" script name to use as bb's initab ::shutdown: ? (instead of tons of code hardcoded in inittab)
18:53.41landleymnemoc: check out the busybox help page, I think there's a sample there?
18:54.05landleyhttp://busybox.net/downloads/BusyBox.html#item_init
18:58.15mnemoclandley: they do direct calls to umount and swapoff
18:59.00landleymnemoc: so?
18:59.12mnemoclandley: but as rcS for ::sysinit: I wanted to use an script for ::shutdown: .. but with an "standard" name :\  I guess I'll use rc0
18:59.37landleyIf you want to know what busybox is doing in the absence of a script, there it is.
18:59.42landleyIf you want to do something else, you're welcome to.
18:59.54landleyIf you want to do something else and have it called a "standard", we're having a semantic argument. :)
19:00.20landleyPersonally, I tend to make bsd style init scripts.
19:00.28landleyA script to bring the system up, and a script to bring the system down.
19:00.54mnemoclandley: and what name would you use for the script to bring the system down? :)
19:00.55landleyBreaking it into 8 gazillion little scripts called with "start" and "stop" arguments was done by the system 5 guys so they could have a GUI tool enable/disable them.
19:01.02landleyDoesn't apply to embedded systems much.
19:01.14landley<PROTECTED>
19:01.28mnemocgreat suggestion :)
19:01.42mnemocthanks a lot ,-)  I use that
19:01.47landleyYou're welcome.
19:01.49*** mode/#elinux [+o prpplague] by ChanServ
19:41.18mnemoclandley: in the case the "system" that use bb's init is actually an initramfs, there is any suggested place to switch_root?
19:43.21landleymnemoc: what do you mean?
19:43.45landleyplace to call switch_root from?  Place to switch_root to?  Place to keep the switch_root executable...?
19:44.40mnemocplace from where to call switch_root
19:44.48mnemocrc.reboot ?
19:45.22landleymnemoc: ok, the kernel calls /init out of initramfs.
19:45.36landleyThat's generally going to be a shell script if you want to do a switch_root.
19:45.58landleyHave your shell script do whatever setup it needs, and then "exec switch_root".  (Don't forget to exec, you want switch_root to be pid 1, not a child of pid 1.)
19:46.58mnemocyes, in a normal case that's what i do
19:47.21mnemocbut i was requested to make a "rescue" initrd... with ssh support and stuff
19:47.27mnemocin the case root doesn't mount properly
19:47.36landleyok..
19:47.46landleyIn that case, you probably don't want to call switch_root at all.
19:47.58landleyWhen you call switch_root, the contents of initramfs get deleted.
19:48.17landleyYou can do a mount --bind and a chroot instead...
19:48.59landleyExcept that requires finding a directory in the final filesystem to do the bind mount on, and that's iffy...
19:49.00mnemoc.oO
19:49.27landleyProbably just keep the hard drive's filesystem mounted as a subdirectory and work with it in there.
19:50.25mnemocbut the "real" /sbin/init wont be pid 1 in that case... wont that cause troubles?
19:50.42landleyOk, what do you want the system to _do_?
19:51.04landleyIf the final root filesystem doesn't mount, don't call switch_root.  (You have nothing to switch_root into.)
19:51.16landleyIf it does mount, switch_root and delete the content of initramfs.
19:51.21landleyIs that what you want to do?
19:51.27mnemocaha!
19:51.30mnemocgot your point
19:52.06mnemocthanks a lot for the enlightenment!
19:52.49mnemoci was about to start the rescue system always and then "shut it off" if the mount and switch_root works fine :p
19:53.27mnemocbut you are right, the rescue system has to go up only if i can't switch_root :D
19:53.33mnemocthank you very much :)
19:53.45mnemocback to drawing
19:54.48landleyYou're welcome.
19:55.15mnemoc:)
20:21.54*** join/#elinux ico2 (n=ico2@modem-3499.chimpanzee.dialup.pol.co.uk)
22:16.26*** join/#elinux ico2_ (n=ico2@modem-1488.chameleon.dialup.pol.co.uk)
23:07.55*** join/#elinux TimRiker (n=timr@rikers.org)
23:07.55*** mode/#elinux [+o TimRiker] by ChanServ
23:59.45*** join/#elinux TimRiker (n=timr@pdpc/supporter/bronze/TimRiker)
23:59.45*** mode/#elinux [+o TimRiker] by ChanServ

Generated by irclog2html.pl Modified by Tim Riker to work with infobot.