/etc/issue

For questions during install

/etc/issue

Postby scrizo » Fri Jun 12, 2015 1:28 pm

So I did the default all in one install configured the network card to use static and assigned it an IP.

However after reboot it says to connect to the browser at http://

and it's blank I have checked the following places:
/etc/sysconfig/network-scripts/ifcfg-em1
/etc/resolv.conf
netstat -rn
ifconfig

Any ideas
scrizo
 
Posts: 11
Joined: Fri Jun 12, 2015 1:26 pm

Re: /etc/issue

Postby fadmin » Fri Jun 12, 2015 9:39 pm

OK this patch should do the trick:

*MAKE SURE NOBODY IS USING OSDIAL AND ARE ALL LOGGED OUT PRIOR TO PATCHING*

First make a copy in case it gives you a problem, this will copy the original file to root's home dir.
cp /etc/rc.d/init.d/osdial ~/osdial-orig

Copy this content *between* the lines into a file named osdial-rc.patch:
________________________________
--- /etc/rc.d/init.d/osdial 2015-06-12 21:03:46.260940708 -0400
+++ /etc/rc.d/init.d/osdial 2015-06-12 21:06:24.721940475 -0400
@@ -36,11 +36,14 @@
fi

start() {
- # Get INET address from eth0 or eth1
- INET=`/sbin/ip ad li dev eth0 | grep 'inet ' | cut -d ' ' -f 6 | cut -d '/' -f 1`
+ # Get INET address from the network device
+ NIC=`ifconfig|grep -m1 0|cut -c1-6`
+ INET=`/sbin/ip ad li dev $NIC | grep 'inet ' | cut -d ' ' -f 6 | cut -d '/' -f 1`
if [ -z "$INET" ]; then
+ NIC=`ifconfig|grep -m1 1|cut -c1-6`
INET=`/sbin/ip ad li dev $NIC | grep 'inet ' | cut -d ' ' -f 6 | cut -d '/' -f 1`
fi
+

if [ "$OSDIAL_FIRSTRUN" != "NO" ]; then
TIMEOUT=60
___________________________

Now we'll run the patch:
patch < osdial-rc.patch

Then to see that the patch was applied run:
grep -A7 -m1 'start()' /etc/rc.d/init.d/osdial

It should list the above additions (starting with a + sign).

If you have a problem restore the original file with:
cp ~/osdial-orig /etc/rc.d/init.d/osdial

The next time you boot it should show the IP of the network card.
You can also run it with:
/etc/rc.d/init.d/osdial restart
Forum Administrator
OSDial
http://osdial.com
fadmin
Site Admin
 
Posts: 283
Joined: Fri Feb 12, 2010 7:27 am

Re: /etc/issue

Postby scrizo » Mon Jun 15, 2015 10:34 am

# cat osdial-rc.patch
--- /etc/rc.d/init.d/osdial 2015-06-12 21:03:46.260940708 -0400
+++ /etc/rc.d/init.d/osdial 2015-06-12 21:06:24.721940475 -0400
@@ -36,11 +36,14 @@
fi

start() {
- # Get INET address from eth0 or eth1
- INET=`/sbin/ip ad li dev eth0 | grep 'inet ' | cut -d ' ' -f 6 | cut -d '/' -f 1`
+ # Get INET address from the network device
+ NIC=`ifconfig|grep -m1 0|cut -c1-6`
+ INET=`/sbin/ip ad li dev $NIC | grep 'inet ' | cut -d ' ' -f 6 | cut -d '/' -f 1`
if [ -z "$INET" ]; then
+ NIC=`ifconfig|grep -m1 1|cut -c1-6`
INET=`/sbin/ip ad li dev $NIC | grep 'inet ' | cut -d ' ' -f 6 | cut -d '/' -f 1`
fi
+

if [ "$OSDIAL_FIRSTRUN" != "NO" ]; then
TIMEOUT=60




[root@osdial-391da9cf ~]# patch < osdial-rc.patch
can't find file to patch at input line 3
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|--- /etc/rc.d/init.d/osdial 2015-06-12 21:03:46.260940708 -0400
|+++ /etc/rc.d/init.d/osdial 2015-06-12 21:06:24.721940475 -0400
--------------------------
File to patch: ^C
scrizo
 
Posts: 11
Joined: Fri Jun 12, 2015 1:26 pm

Re: /etc/issue

Postby scrizo » Mon Jun 15, 2015 12:35 pm

Can I just edit the /etc/rc.d/init.d/osdial and change the eth0 and eth1 to em1?
scrizo
 
Posts: 11
Joined: Fri Jun 12, 2015 1:26 pm

Re: /etc/issue

Postby fadmin » Mon Jun 15, 2015 4:40 pm

Yes you can. It ran just fine on my test server but I'll fix the patch when I get a moment. However, the need to adjust that is very minor all it does is make the ip address appear in /etc/issue.
Forum Administrator
OSDial
http://osdial.com
fadmin
Site Admin
 
Posts: 283
Joined: Fri Feb 12, 2010 7:27 am

Re: /etc/issue

Postby scrizo » Tue Jun 16, 2015 11:13 am

Maybe my lines are different than yours when it is looking for @@ -36,11 +36,14 @@
fi

because that was where the problems started when i made changes to the script, i just modified the osdial and replace eth0 with my adapter and then restarted osdial and cat /etc/issue and saw the banner reflect the ip correctly
scrizo
 
Posts: 11
Joined: Fri Jun 12, 2015 1:26 pm


Return to Installation

Who is online

Users browsing this forum: No registered users and 1 guest

cron