LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-04-2014, 09:35 PM   #1
hba
Member
 
Registered: May 2012
Location: Oaxaca, México
Distribution: Slackware Linux
Posts: 45

Rep: Reputation: 20
Modifications to rc.inet1, rc.inet1.conf and rc.wireless


These are some modifications to cut the boot time of slackware and get a login prompt... or slim, in my case

/etc/rc.d/rc.inet1

Code:
--- rc.inet1.orig	2014-11-27 21:21:30.390276045 -0600
+++ rc.inet1.new	2014-11-27 22:00:13.212003128 -0600
@@ -140,7 +140,9 @@ if_up() {
         [ "${DHCP_DEBUG[$i]}" = "yes" ] && DHCP_OPTIONS="$DHCP_OPTIONS -d"
         [ "${DHCP_NOIPV4LL[$i]}" = "yes" ] && DHCP_OPTIONS="$DHCP_OPTIONS -L"
         [ ${DHCP_IPADDR[$i]} ] && DHCP_OPTIONS="$DHCP_OPTIONS -r ${DHCP_IPADDR[$i]}"
-        echo "Polling for DHCP server on interface ${1}:"
+        [ "${DHCP_NOWAIT[$i]}" = "yes" ] && DHCP_OPTIONS="$DHCP_OPTIONS -b"
+        [ "${DHCP_QUIET[$i]}" = "yes" ] && DHCP_OPTIONS="$DHCP_OPTIONS -q"
+        echo "Polling for DHCP server on interface ${1}:" | $LOGGER
         # If you set a timeout, you get one, even if the kernel doesn't think that
         # your device is connected, in case /sys isn't right (which it usually isn't
         # except right after the device is loaded, when it usually is):
  • DHCP_NOWAIT: send dhcpcd to background without waiting for an IP address.
  • DHCP_QUIET: quiet mode for dhcpcd.
  • ATM the echo "Polling for DHCP server... is not using the $LOGGER, maybe a bug?

/etc/rc.d/rc.wireless

Code:
--- rc.wireless.orig	2014-11-27 21:34:50.856299180 -0600
+++ rc.wireless.new	2014-11-27 22:11:18.385004610 -0600
@@ -175,6 +175,7 @@ WPADRIVER=${WLAN_WPADRIVER[$i]:-${WPADRI
 # The default config file as installed by the wpa_supplicant package:
 WPACONF=${WLAN_WPACONF[$i]:-${WPACONF:="/etc/wpa_supplicant.conf"}}
 WPAWAIT=${WLAN_WPAWAIT[$i]:-${WPAWAIT:="60"}}
+WPAQUIET=${WLAN_WPAQUIET[$i]:-${WPAQUIET:="no"}}
 
 
 [ -n "$VERBOSE" -a -n "$INFO" ] && echo "$0:  $1 information: '$INFO'"
@@ -290,7 +291,8 @@ if [ "$WPA" = "wpa_supplicant" ] || [ "$
 	$IFCOMMAND down
 	#WPACONF=${WPACONF:-/etc/wpa_supplicant.conf}
 	WPA_OPTIONS=""
-	[ ${WPADRIVER} ] && WPA_OPTIONS="-D${WPADRIVER}" # specify the driver
+	[ "${WPAQUIET}" = "yes" ] && WPA_OPTIONS="-q"
+	[ ${WPADRIVER} ] && WPA_OPTIONS="${WPA_OPTIONS} -D${WPADRIVER}" # specify the driver
 	[ ${WPA} = "wpaxsupplicant" ] && WPA_OPTIONS="${WPA_OPTIONS} -e" # Use external xsupplicant (disables the internal supplicant)
 
 	# We leave a running wpa_supplicant process in peace:
  • WPAQUIET: quiet mode for wpa_supplicant.

/etc/rc.d/rc.inet1.conf

Code:
--- rc.inet1.conf.orig	2014-12-04 20:20:38.261011849 -0600
+++ rc.inet1.conf.new	2014-12-04 20:20:27.803011686 -0600
@@ -0,0 +1,5 @@
+for i in eth0 wlan0 usb0; do
+  if [ -r /etc/rc.d/rc.inet1.d/$i.conf ]; then
+    . /etc/rc.d/rc.inet1.d/$i.conf
+  fi
+done
This is mostly to help me organize the configuration for these 3 interfaces. For example, this is the content of /etc/rc.d/rc.inet1.d/wlan0.conf:

Code:
IFNAME[4]="wlan0"
USE_DHCP[4]="yes"
DHCP_DEBUG[4]="no"
DHCP_TIMEOUT[4]=60
DHCP_NOWAIT[4]="yes"
DHCP_QUIET[4]="yes"
WLAN_ESSID[4]="hba"
WLAN_MODE[4]=Managed
WLAN_WPA[4]="wpa_supplicant"
WLAN_WPADRIVER[4]="wext"
WLAN_WPAQUIET[4]="yes"
 
Old 12-07-2014, 04:57 AM   #2
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-Current
Posts: 6,450
Blog Entries: 15

Rep: Reputation: 2031Reputation: 2031Reputation: 2031Reputation: 2031Reputation: 2031Reputation: 2031Reputation: 2031Reputation: 2031Reputation: 2031Reputation: 2031Reputation: 2031
You should submit these to the Slackware Wiki.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
rc.inet1.conf/rc.wireless suggestion? TommyC7 Slackware 3 09-01-2012 11:09 AM
wireless keeps dropping - using edited rc.inet1.conf pevsner Slackware 2 01-23-2011 06:08 PM
rc.wireless.conf and rc.inet1.conf for wireles cards davimint Slackware 1 07-13-2007 06:44 AM
How to configure wireless with rc.inet1.conf Murkhadh Linux - Wireless Networking 2 02-17-2007 11:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration