You are not logged in.
No, it is on boot. If I don't prefix it with sudo, it says connection can't own net.connman or whatever...
gothmog123 wrote:Also after an update connman only runs with sudo in the custom start script. lol
Make sure to run the "rc start connman" command as root. (I'm guessing this problem occurs when you start it manually as a user, not on boot)
Offline
Finally had an oppurtunity to set this up this morning. Have started with udev to make it a bit easier at the start.
Once I added a couple of modprobe lines and a few echoes to /etc/minirc.local things booted up pretty much like normal. So far. Me still using netcfg helped a bit but I still need a bit more time to test.
One thing I've noticed is memory used is down alot after boot.
It's all been rather painless.
Cheers
You're just jealous because the voices only talk to me.
Offline
Mounting nfs shares from fstab fails as mount -a is run before the rpcbind daemon is started, not sure what to do about that yet.
EDIT: sorted
made a custom_start for rpcbind which runs mount -a again.
Had to add an echo line to see that the rpcbind daemon was being started though.
Last edited by moetunes (2013-09-17 22:28:56)
You're just jealous because the voices only talk to me.
Offline
I've installed minirc and it runs perfectly. But I want to replace udev without using mdev. So I choosed eudev. It runs, but it cannot handle the network interfaces; how can I fix that?
/* No Comment */
Offline
I have similar problem
I cant get wicd working
As output it throws me to check if dbus is running which is.
And I can't shutdown, or reboot.
I get message 'Failed to talk to init'.
At least it boots without problem.
rm -rf /
Offline
Make sure to use the busybox versions of the poweroff/reboot commands. The minirc package should install those to /sbin/poweroff and /sbin/reboot. In doubt, use "busybox poweroff" or "busybox reboot".
And you could fix the wicd problem by switching to wpa_supplicant.
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
You made my day
I'm using it along with eudev, and it works flawlessly on my notebook
Thanks for the script, it's awesome !
Hobbes: Shouldn't we read the instructions?
Calvin: Do I look like a sissy ?
Offline
Network Problem is solved. Eudev do not manage interfaces dynamicly. In worst case, sombody
have to start the interfaces manuell
/* No Comment */
Offline
I've ran into a problem with minirc. I'm french, so I use that crappy AZERTY keyboard. And I've found that the "best" way to load my keymap on boot, is to modify the /sbin/rc script, to add loadkeys fr in the on_boot() function.
Is that possible to add a custom_boot() function to the minirc.conf ? So that, in the rc script we would find:
custom_boot() { on_boot "$@"; }
source /etc/minirc.conf
...
case "$1" in
init)
custom_boot();;
...
And in minirc.conf:
custom_boot() {
#
# user defined commands to run on boot
#
on_boot();
}
Thanks in advance
Last edited by z3bra (2013-12-05 14:29:50)
Hobbes: Shouldn't we read the instructions?
Calvin: Do I look like a sissy ?
Offline
There is nothing wrong with adding code to the on_boot function, if that works for you.
If you want a "better" way, you can just put your code in /etc/minirc.local, which is run at boot if it exists.
Minirc will run /etc/minirc.local on boot if the file exists and has the
executable bit set. This allows the user to run commands in addition to the
basic startup that minirc provides.
Or use a similar procedure to minirc.local.shutdown -- create a file called "/etc/minirc.local.onboot" and put your boot script in it, then run it from the rc on_boot function.
The way you are suggesting will probably work too, but there are easier ways, IMO.
Last edited by 2ManyDogs (2013-12-05 16:51:42)
Offline
Aaaah I missed the minirc.local point! Thanks for the reminder
Hobbes: Shouldn't we read the instructions?
Calvin: Do I look like a sissy ?
Offline
I've just noticed the settings in /etc/sysctl.conf weren't being applied so I added a line in minirc.local for that.
sysctl -p &> /dev/null
Without the redirection the tty gets a bit noisey...
You're just jealous because the voices only talk to me.
Offline
I've just noticed the settings in /etc/sysctl.conf weren't being applied so I added a line in minirc.local for that.
Without the redirection the tty gets a bit noisey...
What about
sysctl -q -p
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
I should have checked the man page better...
Cheers
You're just jealous because the voices only talk to me.
Offline
I use busybox for init, and it's great - here are my scripts:
/etc/init.d/rc (this is lengthy, all-in-one, hopefully interesting!)
/etc/inittab (calls rc at init & shutdown/reboot)
/etc/acpi/handler.sh (calls poweroff when power button is pressed)
/usr/share/udhcpc/default.script (if using busybox's udhcpc instead of e.g. dhcpcd)
This is with the following as symlinks to /bin/busybox: /sbin/{init,getty,killall5,halt,poweroff,rdev,reboot} /bin/ash
Optional symlink: /sbin/udhcpc (busybox's nicely lightweight dhcpcd replacement)
And in /root/.bashrc:
alias poweroff="setsid /etc/init.d/rc shutdown"
alias reboot="setsid /etc/init.d/rc reboot"
Edit: Shutdowns are clean, don't need to consider pivot_root anymore
Edit2: Added getty, to use from busybox, instead of mingetty.
Edit3: Added rdev, to help identify the root partition, for filesystem check.
Edit4: Added setsid to the 2 aliases above, to work when run over SSH.
Last edited by brebs (2014-05-25 13:58:09)
Offline
I use busybox for init, and it's great - here are my scripts:
/etc/init.d/rc (this is lengthy, all-in-one, hopefully interesting!)
/etc/inittab (calls rc at init & shutdown/reboot)
/etc/acpi/handler.sh (calls poweroff when power button is pressed)This is with the following as symlinks to /bin/busybox: /sbin/{init,killall5,halt,poweroff,reboot} /bin/ash
Getting a clean unmount of / has been a problem, after e.g. recompiling glibc - I wonder if the mystical pivot_root, or mount --bind might be needed?
What I don't understand here is, how do you reboot? inittab calls "rc shutdown" and will do so even when you run reboot. So how exactly does the last section of the rc file (the case switches) come into play?
Oh, and my patch for killall5 to ignore kernel processes got accepted, so you can drop your workarounds for this.
Offline
the case switches
That "case" section is necessary for any of the rc file to be run Because everything above it are just functions. Same as in a sysv initscript.
Edit: So for reboot, taking as an example the power button, what I think happens is:
I press power button, acpid runs /etc/acpi/handler.sh, which runs: exec poweroff
/sbin/poweroff (which is a symlink to busybox) signals /sbin/init, which (from /etc/inittab) runs: /etc/init.d/rc shutdown (this is the "run_actions(SHUTDOWN)" line in busybox's init/init.c)
Busybox then performs its own shutdown procedures (including quickly killing any remaining processes that weren't killed by my script), and final shutdown.
patch for killall5
I noticed - that's the patch to return 2 if there are no processes to signal.
The little "omit" bit in my rc file is mostly for safety, especially since I was toying with having it run by dash (running util-linux's killall5, I think), rather than busybox's ash, to see if there was any speed difference.
Edit2: You might be thinking of my "lsof" & "ps" commands, which are just for debugging info.
Last edited by brebs (2014-02-06 19:37:31)
Offline
I press power button, acpid runs /etc/acpi/handler.sh, which runs: exec poweroff
/sbin/poweroff (which is a symlink to busybox) signals /sbin/init, which (from /etc/inittab) runs: /etc/init.d/rc shutdown (this is the "run_actions(SHUTDOWN)" line in busybox's init/init.c)
Busybox then performs its own shutdown procedures (including quickly killing any remaining processes that weren't killed by my script), and final shutdown.
I asked about rebooting, not poweroff. How does the reboot part of that case switch get called, when inittab only ever invokes either "rc init" or "rc shutdown"?
Edit2: You might be thinking of my "lsof" & "ps" commands, which are just for debugging info.
Yeah, that part. I took a closer look and see the comments now, it's indeed just to see which were the problematic processes.
Offline
How does the reboot part of that case switch get called.
Ah, it doesn't, in the current setup. That's a remnant from when I was playing with calling /etc/init.d/rc from BASH. I'll tidy it up.
I'm used to using the command "shutdown", rather than "poweroff". In fact, I put in /root/.bashrc:
alias shutdown="poweroff"
Last edited by brebs (2014-02-06 21:15:55)
Offline
Ah, it doesn't, in the current setup.
Thought so. So how do you reboot in your current setup?
The thing is, I want to find a way for a shutdown script to know whether reboot or poweroff was called. Currently I hack busybox to export a RUNLEVEL variable (0 or 6), like sysvinit does. But I don't know if it's the right solution or if there's another way.
Offline
So how do you reboot
/sbin/reboot (a symlink to /bin/busybox) works fine. /etc/init.d/rc shutdown gets called first, just as with /sbin/poweroff
know whether reboot or poweroff was called
Why?
I suppose you could have /root/bin/reboot, which should take priority in your $PATH, to do things before an exec /sbin/reboot
I assume /root/bin/reboot could even be a /bin/ash script which exports a variable, which /etc/init.d/rc can read.
Or e.g. write to a file in /tmp/, that was set at startup with root-only permissions.
Offline
Why?
For a trick from the old initscripts:
if [[ $RUNLEVEL = 0 ]]; then
printhl "${C_H2}POWER OFF"
poweroff -f
else
printhl "${C_H2}REBOOTING"
reboot -f
fi
We've already killed everything earlier in the script, so in the end we run -f to skip init's internal killing mechanism. You know, cos boot/shutdown times are the most important thing in the world .
Offline
I see. That was basically the original idea that I had, with aliases, e.g.:
alias poweroff="/etc/init.d/rc shutdown"
And then have the shutdown function in /etc/init.d/rc that runs:
go_down
poweroff -f
Same for reboot.
In fact, now I'm more confident about what busybox is doing, I might just do that Edit: done
Last edited by brebs (2014-02-06 23:30:47)
Offline
The latest update to libpulse requires libsystemd-journal.so.0 so things like mpv won't work if systemd has been removed. I added libpulse to the ignore line in pacman.conf which should work for a little while...
You're just jealous because the voices only talk to me.
Offline
Really love this!
Works out of the box. Not everything of course, but got X running w/o a problem.
(Though using systemd udev, really don't care.)
As for wicd/dbus it seems that one has to create a /run/dbus directory before starting dbus to get the system_bus_socket.
(No idea why, found this hint here: http://daemonforums.org/showthread.php?t=5502#post43223.)
Got wicd running, so I think I'll use
mkdir /run/dbus
/usr/bin/dbus-daemon --system
as custom dbus startup.
Ah yes also the default_poll for dbus doesn't work I think... but I'm not sure for the regex ...
pgrep "^$1\$" >& /dev/null;;
Shouldn't even be too hard to use this with sinit (https://bbs.archlinux.org/viewtopic.php?id=176854) and get rid of inittab...
Edit: I checked the openrc script for dbus and they do it aswell, a bit more elaborate:
start() {
ebegin "Starting D-BUS system messagebus"
/usr/bin/dbus-uuidgen --ensure=/etc/machine-id
# We need to test if /run/dbus exists, since script will fail if it does not
[ ! -e /run/dbus ] && mkdir /run/dbus
start-stop-daemon --start --pidfile /run/dbus/pid --exec /usr/bin/dbus-daemon -- --system
eend $?
Last edited by rebootl (2014-02-15 18:45:56)
Personal website: reboot.li
GitHub: github.com/rebootl
Offline