Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 438502 Details for
Bug 532746
sys-kernel/genkernel-3.4.49.2 - gen_initramfs.sh generates /etc/hostid with incorrect byte order
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to fix problem
0001-Fix-little-endian-problem-with-hostid.patch (text/plain), 1.14 KB, created by
Jason Miller
on 2016-06-22 23:16:36 UTC
(
hide
)
Description:
Patch to fix problem
Filename:
MIME Type:
Creator:
Jason Miller
Created:
2016-06-22 23:16:36 UTC
Size:
1.14 KB
patch
obsolete
>From f05296f13e788384b1075d9931ade5378a422ab2 Mon Sep 17 00:00:00 2001 >From: Jason Miller <aidenn0@geocities.com> >Date: Wed, 22 Jun 2016 16:12:10 -0700 >Subject: [PATCH] Fix little-endian problem with hostid > >--- > gen_initramfs.sh | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > >diff --git a/gen_initramfs.sh b/gen_initramfs.sh >index 99a99c4..69eee99 100755 >--- a/gen_initramfs.sh >+++ b/gen_initramfs.sh >@@ -100,7 +100,13 @@ append_base_layout() { > date -u '+%Y%m%d-%H%M%S' > ${TEMP}/initramfs-base-temp/etc/build_date > echo "Genkernel $GK_V" > ${TEMP}/initramfs-base-temp/etc/build_id > >- printf "$(hostid | sed 's/\([0-9A-F]\{2\}\)/\\x\1/gI')" > ${TEMP}/initramfs-base-temp/etc/hostid >+ little_endian="$(echo I | tr -d [:space:] | od -to2 | head -n1 | awk '{print $2}' | cut -c6)" >+ if test "$little_endian" = 1; then >+ hostid="$(hostid |sed 's/\(..\)\(..\)\(..\)\(..\)/\4\3\2\1/')" >+ else >+ hostid="$(hostid)" >+ fi >+ printf "$(echo "$hostid" | sed 's/\([0-9A-F]\{2\}\)/\\x\1/gI')" > ${TEMP}/initramfs-base-temp/etc/hostid > > cd "${TEMP}/initramfs-base-temp/" > log_future_cpio_content >-- >2.7.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 532746
: 438502