[arch-general] [RFT] initscripts 2011.01-1
Okay, this has been sitting in git for a loooong time, and I am throwing it out there. This should receive lots of testing, as there has been major rewriting done. We need to make sure there are no regressions. It should also fix a small number of bugs. New known bugs: When netcfg's init scripts are called, these lines are printed: /etc/rc.d/functions: line 320: declare: add_hook: readonly variable /etc/rc.d/functions: line 320: declare: run_hook: readonly variable This happens when rc.functions is loaded twice, I'll look into fixing that. This is the shortlog: Dan McGee (1): Unify capitalization of 'Udev' Dave Reisner (2): rc.sysinit: condense calls to mkdir and chmod Use modprobe's --all flag instead of looping. Florian Pritz (1): restrict NETWORK_PERSIST to runlevel 0 and 6 Gerardo Exequiel Pozzi (1): Add support for serial console Heiko Baums (3): cryptsetup: read keys for non-root LUKS partitions as raw data from block device cryptsetup: abort if LUKS is found on swap partition cryptsetup: print name of device being opened Thomas Bächler (5): Remove a redundant subshell, see FS#20016 Fix two typos introduced by the latest patch series Change SWAP sanity check to use blkid in favor of cryptsetup Fix isLuks check Change copyright and license information Tom Gundersen (9): udevadm: trigger events of type subsystems as well as devices udevadm: retry failed udev events after filesystems have been mounted udev: do not copy /lib/udev/devices/* to /dev locale: set the sysfs value default_utf8 rather than enabling/disabling utf8 in locale.sh mount: forbid suid,exec,dev from /proc and /sys lvm: run vgchange in sysinit mode lvm: enable/disable monitoring of lvm2 groups cryptsetup: fix indentation PATH: export a standard path in rc.sysinit Victor Lowther (15): Bashify initscripts. A little creative parameter expansion simplifies stat_die(). Clean up status() function. Simplify in_array. Finish bashifying functions. Bashify rc.multi Bashify rc.single. Both rc.single and rc.shutdown use the same code to kill everything. Bashify rc.shutdown Bashify rc.sysinit, part 1 Rewrite /etc/crypttab processing. Bashify netfs Bashify adjtime.cron Trivial bashification of network script. Add a PKGBUILD for building initscripts-git for testing.
Excerpts from Thomas Bächler's message of Mi Jan 26 18:34:22 +0100 2011:
Okay, this has been sitting in git for a loooong time, and I am throwing it out there. This should receive lots of testing, as there has been major rewriting done. We need to make sure there are no regressions. It should also fix a small number of bugs.
<snip>
Rewrite /etc/crypttab processing.
I've found a small issue coming from this: the "fourth column" (options) in /etc/crypttab used to mean "everything beginning with the 4th column to the end of the line", apparently now it is required to put the whole expression within "..". For instance I have some parameters in the SWAP line, I had to change the line swap /dev/vg/swap SWAP -c aes-xts-plain -h sha256 -s 256 to swap /dev/vg/swap SWAP "-c aes-xts-plain -h sha256 -s 256" In the first case, the cryptsetup call during sysinit fails, since only '-c' was used as a parameter and the call 'cryptsetup -d /dev/urandom -c create ...' didn't make sense to cryptsetup. ---- Another slight annoyance comes from the lines (from rc.sysinit) # isLuks only gives an exit code but no output to # stdout or stderr. if $CS isLuks "$2"; then open=luksOpen a="$2" b="$1" fi It's not true that there's no output; I get the message "Device /dev/vg/swap is not a valid LUKS device." every time I boot :) Do you want me to file a bug?
Am 27.01.2011 11:50, schrieb Jan Spakula:
Excerpts from Thomas Bächler's message of Mi Jan 26 18:34:22 +0100 2011:
Okay, this has been sitting in git for a loooong time, and I am throwing it out there. This should receive lots of testing, as there has been major rewriting done. We need to make sure there are no regressions. It should also fix a small number of bugs.
<snip>
Rewrite /etc/crypttab processing.
I've found a small issue coming from this: the "fourth column" (options) in /etc/crypttab used to mean "everything beginning with the 4th column to the end of the line", apparently now it is required to put the whole expression within "..". For instance I have some parameters in the SWAP line, I had to change the line
swap /dev/vg/swap SWAP -c aes-xts-plain -h sha256 -s 256
to
swap /dev/vg/swap SWAP "-c aes-xts-plain -h sha256 -s 256"
In the first case, the cryptsetup call during sysinit fails, since only '-c' was used as a parameter and the call 'cryptsetup -d /dev/urandom -c create ...' didn't make sense to cryptsetup.
This doesn't make sense to me either. It should work the way it is.
----
Another slight annoyance comes from the lines (from rc.sysinit)
# isLuks only gives an exit code but no output to # stdout or stderr. if $CS isLuks "$2"; then open=luksOpen a="$2" b="$1" fi
It's not true that there's no output; I get the message "Device /dev/vg/swap is not a valid LUKS device." every time I boot :)
Okay, that one is easy.
Am 27.01.2011 11:50, schrieb Jan Spakula:
Excerpts from Thomas Bächler's message of Mi Jan 26 18:34:22 +0100 2011:
Okay, this has been sitting in git for a loooong time, and I am throwing it out there. This should receive lots of testing, as there has been major rewriting done. We need to make sure there are no regressions. It should also fix a small number of bugs.
<snip>
Rewrite /etc/crypttab processing.
https://projects.archlinux.org/initscripts.git/commit/?id=c1f38e1186a60a2d63... https://projects.archlinux.org/initscripts.git/commit/?id=f4703f832e6d8578c5... Please try these two trivial patches. They should fix your issues (revert your crypttab back to the previous format).
Excerpts from Thomas Bächler's message of Do Jan 27 14:04:12 +0100 2011:
Am 27.01.2011 11:50, schrieb Jan Spakula:
Excerpts from Thomas Bächler's message of Mi Jan 26 18:34:22 +0100 2011:
https://projects.archlinux.org/initscripts.git/commit/?id=c1f38e1186a60a2d63...
https://projects.archlinux.org/initscripts.git/commit/?id=f4703f832e6d8578c5...
Please try these two trivial patches. They should fix your issues (revert your crypttab back to the previous format).
Yep, these solve the issues. Thanks and sorry the hassle. Jan
Am Thu, 27 Jan 2011 11:50:31 +0100 schrieb Jan Spakula <bender02@archlinux.us>:
Another slight annoyance comes from the lines (from rc.sysinit)
# isLuks only gives an exit code but no output to # stdout or stderr. if $CS isLuks "$2"; then open=luksOpen a="$2" b="$1" fi
It's not true that there's no output; I get the message "Device /dev/vg/swap is not a valid LUKS device." every time I boot :)
But this is the output on the console. For those if clauses you need a boolean (true or false resp. 0 or 1) and this is not given by cryptsetup isLuks. This value is only given as an exit code. So this part of the script is absolutely correct and the only way to handle this.
Do you want me to file a bug?
Not necessary, it's not a bug. You probably can file a feature request to cryptsetup upstream, if you don't like the exit code method. Heiko
Excerpts from Heiko Baums's message of Do Jan 27 14:23:25 +0100 2011:
Am Thu, 27 Jan 2011 11:50:31 +0100 schrieb Jan Spakula <bender02@archlinux.us>:
Another slight annoyance comes from the lines (from rc.sysinit)
# isLuks only gives an exit code but no output to # stdout or stderr. if $CS isLuks "$2"; then open=luksOpen a="$2" b="$1" fi
It's not true that there's no output; I get the message "Device /dev/vg/swap is not a valid LUKS device." every time I boot :)
But this is the output on the console. For those if clauses you need a boolean (true or false resp. 0 or 1) and this is not given by cryptsetup isLuks. This value is only given as an exit code. So this part of the script is absolutely correct and the only way to handle this.
I like clause with exit codes much better that any funky checking for a message ;) I was addressing the comment in the script that it "..gives no output"; silently suggesting to explicitly silence the cryptsetup call, so that no unnecessary messages are displayed during booting. Jan
Am Thu, 27 Jan 2011 14:53:46 +0100 schrieb Jan Spakula <bender02@archlinux.us>:
I like clause with exit codes much better that any funky checking for a message ;) I was addressing the comment in the script that it "..gives no output"; silently suggesting to explicitly silence the cryptsetup call, so that no unnecessary messages are displayed during booting.
Oh, sorry. Misunderstood this. Well, I guess adding a >/dev/null and/or 2>/dev/null should be easy. Heiko
participants (3)
-
Heiko Baums
-
Jan Spakula
-
Thomas Bächler