WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Saving Netcardconfig settings  (Read 3778 times)

Offline aplannan

  • Jr. Member
  • **
  • Posts: 70
Saving Netcardconfig settings
« on: May 06, 2009, 06:25:10 PM »
Wondering if anyone could tell me how to save my Netcardconfig settings. I have to manually change it from eth0 to eth1 everytime i reboot and then set it to DHCP. It would be great if I could just set it to do that by default. Thanks in advance

Offline tobiaus

  • Suspended
  • Hero Member
  • *****
  • Posts: 599
Re: Saving Netcardconfig settings
« Reply #1 on: May 06, 2009, 06:31:19 PM »
Wondering if anyone could tell me how to save my Netcardconfig settings. I have to manually change it from eth0 to eth1 everytime i reboot and then set it to DHCP. It would be great if I could just set it to do that by default. Thanks in advance

i think the first thing is to turn off dhcp from the boot option: nodhcp. if you're using grub as a bootloader it will be in: sudo find / grep -i menu.lst (that will tell you exactly where menu.lst is.)

then the line to add to /opt/bootlocal.sh is:
Quote
/sbin/udhcpc -b -i eth0 -h box -p /var/run/udhcpc.eth0.pid

but you'll probably want to change eth0 to eth1. this will probably work, but i'm pretty sure someone will know a better way.

Offline aplannan

  • Jr. Member
  • **
  • Posts: 70
Re: Saving Netcardconfig settings
« Reply #2 on: May 06, 2009, 07:24:21 PM »
Thank you tobiaus. That got me close. The script you gave me does work if I manually execute my bootlocal.sh from emelfm2 but does not run automatically at boot. Hmmmm.

Offline tobiaus

  • Suspended
  • Hero Member
  • *****
  • Posts: 599
Re: Saving Netcardconfig settings
« Reply #3 on: May 06, 2009, 07:36:06 PM »
The script you gave me does work if I manually execute my bootlocal.sh from emelfm2 but does not run automatically at boot. Hmmmm.

yeah, it never works for me without sudo, or so i thought, but i thought bootlocal ran things as root anyway so 1) it should work in bootlocal 2) what's more, it shouldn't work for emelfm2 unless you're using emelfm2 as superuser. now 1 i have a guess about, the guess is that nodhcp is messing you up. i wouldn't think it should, but my experience with it is limited. i assume it just avoids setting up dhcp, i don't think it actually blocks you from doing so <- therefore ignore this guess please. not to worry, most people here understand this better.

Offline aplannan

  • Jr. Member
  • **
  • Posts: 70
Re: Saving Netcardconfig settings
« Reply #4 on: May 06, 2009, 07:57:07 PM »
Thanks again. I am using emelfm as su. And I tried using sudo to no avail. Oh well, I'll keep trying and let you know if I figure anything out.

Offline ^thehatsrule^

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 1726
Re: Saving Netcardconfig settings
« Reply #5 on: May 06, 2009, 08:16:11 PM »
FYI: if you select yes to "save configuration" in netcardconf, it will save a script in /opt/<interface>.sh

Offline aplannan

  • Jr. Member
  • **
  • Posts: 70
Re: Saving Netcardconfig settings
« Reply #6 on: May 06, 2009, 08:43:57 PM »
Yes, and I see the script in /opt but it does not seem to load at boot. I believe I'm using the newest version of TC. Neither  /opt/bootlocal.sh nor /opt/eth1.sh seem to load at boot, is it possible that it is a bug?
 

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: Saving Netcardconfig settings
« Reply #7 on: May 06, 2009, 09:18:14 PM »
/opt/ethX won't execute unless added to /opt/bootlocal.sh
You can easily perform such with the Tool menu item "Add to Bootlocal"
/opt/bootllocal.sh won't persist unless you have a backup from which to restore it, or choose to use a persistent opt.   Have you performed a backup?
10+ Years Contributing to Linux Open Source Projects.

Offline aplannan

  • Jr. Member
  • **
  • Posts: 70
Re: Saving Netcardconfig settings
« Reply #8 on: May 06, 2009, 10:00:46 PM »
Hi roberts,

eth1.sh seems to be automatically added to bootlocal.sh, and yes I have been performing backups . I'm beginning to wonder if this is somehow connected to to my somewhat ragged install of fluxbox yesterday. I removed some lines from xsession. Are there any that would directly keep bootlocal from executing during startup. I was going to check my live cd tomorrow. Forgot that I had monkeyed around with so much yesterday!

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: Saving Netcardconfig settings
« Reply #9 on: May 06, 2009, 10:26:22 PM »
Upon exiting the WM, exittc is typically run.
If your custom WM setup does not, then no backup.
You can always manually select to do so from control panel.
10+ Years Contributing to Linux Open Source Projects.