Summary: | Patch: Add bootdir parameter to genkernel | ||
---|---|---|---|
Product: | Gentoo Hosted Projects | Reporter: | Martin Parm <parmus> |
Component: | genkernel | Assignee: | Gentoo Genkernel Maintainers <genkernel> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | Keywords: | InVCS |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | gk-4 | ||
Package list: | Runtime testing required: | --- | |
Attachments: |
Adds --bootdir commandline parameter
Adds --bootdir commandline parameter Adds --bootdir commandline parameter (genkernel-3.4.0_pre2 patch) Fix quoting issues Fixes awk- and egrep-expression, a few print_info's and rewrites isBootRO() Adds --bootdir commandline parameter (genkernel-3.4.0_pre2 patch, combined with patch 91453 and 91481) |
Description
Martin Parm
2006-07-10 05:35:20 UTC
Created attachment 91356 [details, diff]
Adds --bootdir commandline parameter
This patch was created with genkernel-3.3.11d
Created attachment 91371 [details, diff]
Adds --bootdir commandline parameter
Minor bug fixed.
This patch was made with genkernel-3.3.11d
Created attachment 91372 [details, diff]
Adds --bootdir commandline parameter (genkernel-3.4.0_pre2 patch)
Same enhancement, different genkernel version
This patch was made with genkernel-3.4.0_pre2.
A few problems: - GRUB_BOOTFS=$(awk '/^[^#].+[[:space:]]\/boot[[:space:]]/ { print $1 }' /etc/fstab) + GRUB_BOOTFS=$(awk '/^[^#].+[[:space:]]\${BOOTDIR}[[:space:]]/ { print $1 }' /etc/fstab) ... don't any slashes in ${BOOTDIR} need escaping? And note the single quotes in the expression, the variable expansion won't kick in... Anyway, please try this patch on top of your existing patch and check things work. Created attachment 91453 [details, diff]
Fix quoting issues
(In reply to comment #4) > A few problems: > > - GRUB_BOOTFS=$(awk '/^[^#].+[[:space:]]\/boot[[:space:]]/ { > print $1 }' /etc/fstab) > + GRUB_BOOTFS=$(awk '/^[^#].+[[:space:]]\${BOOTDIR}[[:space:]]/ { > print $1 }' /etc/fstab) Actually I figured out a much better and more correct way to write that expression altogether: GRUB_BOOTFS=$(awk 'BEGIN{RS="((#[^\n]*)?\n)"}( $2 == "'${BOOTDIR}'") { print $1; exit }' /etc/fstab) This new expression filters out comments correctly (unlike to original one, which only filters strictly leading #'s) and it handles dublicates. It also makes use of awk's field-handling and simple string-matching, which makes escaping unneccesary. Created attachment 91481 [details, diff]
Fixes awk- and egrep-expression, a few print_info's and rewrites isBootRO()
This patch should on top of the two previous ones (91372 and 91453).
It contains :
- Better awk-expressions in gen_bootloader.sh
- A better (more readable) rewrite of isBootRO()
- Better egrep-expressions in genkernel (the file)
- Fixes quotation in a few print_info expressions
Created attachment 91483 [details, diff]
Adds --bootdir commandline parameter (genkernel-3.4.0_pre2 patch, combined with patch 91453 and 91481)
The patch is a combined patch of patches 91372, 91453 and 91481.
3.4.0_pre3 should have all the patches, please check things work and thanks for the patch :) It seems to work nicely in my setup. (In reply to comment #10) > It seems to work nicely in my setup. Great, closing bug... thanks for the patch. |