Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 17175 - baselayout 1.8.6.3 uses /usr/bin/cut before /usr is mounted
Summary: baselayout 1.8.6.3 uses /usr/bin/cut before /usr is mounted
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High blocker
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
: 17352 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-03-09 18:34 UTC by Bobby Bingham
Modified: 2003-03-12 18:00 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bobby Bingham 2003-03-09 18:34:21 UTC
summary says it all.  i believe it was in the scripts to set the hostname and
calculate module dependencies.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Martin Schlemmer (RETIRED) gentoo-dev 2003-03-09 23:31:59 UTC
Urk, you are right, ill fix in a bit.
Comment 2 Martin Schlemmer (RETIRED) gentoo-dev 2003-03-10 02:26:21 UTC
Here is the:

-------------------------------------------------
Index: init.d/hostname
===================================================================
RCS file: /home/cvsroot/gentoo-src/rc-scripts/init.d/hostname,v
retrieving revision 1.13
diff -u -b -B -r1.13 hostname
--- init.d/hostname	2 Mar 2003 22:32:08 -0000	1.13
+++ init.d/hostname	10 Mar 2003 07:20:22 -0000
@@ -23,8 +23,8 @@
 	
 	if checkconfig
 	then
-		myhost="$(cut -f1 -d . < /etc/hostname)"
-		mydomain="$(cut -f2- -d . < /etc/hostname)"
+		myhost="$(awk '{ sub(/\..*/, ""); print }' /etc/hostname)"
+		mydomain="$(awk '{ if (sub(/^[^\.]*\./, "")) print }' /etc/hostname)"
 
 		if [ -z "${mydomain}" ]
 		then

Comment 3 Bobby Bingham 2003-03-10 20:13:03 UTC
that fixes the hostname script, but there is still a problem in /etc/init.d/modules:

if you use the new ability to have /etc/modules.autoload be a directory with separate files for 2.4 and 2.5 kernels, then /etc/init.d/modules calls KV_major and KV_minor from /etc/init.d/functions.sh, which also use /usr/bin/cut before /usr is mounted.
Comment 4 Martin Schlemmer (RETIRED) gentoo-dev 2003-03-12 18:00:24 UTC
*** Bug 17352 has been marked as a duplicate of this bug. ***