Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to hide scriptoutput at boot?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Florian
n00b
n00b


Joined: 26 May 2003
Posts: 4

PostPosted: Wed Apr 27, 2005 3:59 pm    Post subject: How to hide scriptoutput at boot? Reply with quote

Annoyed of not getting my USB Wlan Adaptor working by using the variety of configuration files, I made (which means: read & tried & erred & read & ...) some kind of script.
When it finally worked, I wanted it to be executed automatically at bootup.
As I'm quite a newbie to linux due to a lack of time (and the simplicity of OS X ;)) I simply used an existing initscript to do that and added it to the default runlevel.
Now I all the stuff written in the wlan-script is echoed at boot and reminds me of my kludgy workaround.

So how do i hide these messages?


Here's how I modified /etc/init.d/wlan:
Code:

#!/sbin/runscript

source_config() {
        if [ -f /etc/conf.d/wlanscript ]
        then
                source /etc/conf.d/wlanscript
        else
                return 1
        fi
        return 0
}

(...)



/etc/conf.d/wlanscript:
Code:

#!/bin/bash
PATH=/sbin:$PATH
modprobe prism2_usb prism2_doreset=1
wlanctl-ng wlan0 lnxreq_ifstate ifstate=enable
wlanctl-ng wlan0 lnxreq_autojoin ssid=****** authtype=sharedkey
wlanctl-ng wlan0 lnxreq_hostwep decrypt=true encrypt=true
wlanctl-ng wlan0 dot11req_mibset mibattribute=dot11WEPDefaultKeyID=0
wlanctl-ng wlan0 dot11req_mibset mibattribute=dot11ExcludeUnencrypted=true
wlanctl-ng wlan0 dot11req_mibset mibattribute=dot11PrivacyInvoked=true
wlanctl-ng wlan0 dot11req_mibset mibattribute=dot11WEPDefaultKey0="**:**:**:**:**:**:**:**:**:**:**:**:**"
ifconfig wlan0 192.168.1.123 netmask 255.255.255.0 broadcast 192.168.1.255
ifconfig eth0 down
route add default gw 192.168.1.1


tia,
Florian
Back to top
View user's profile Send private message
hds
Advocate
Advocate


Joined: 21 Aug 2004
Posts: 2629
Location: Sprockhoevel [GER]

PostPosted: Wed Apr 27, 2005 4:03 pm    Post subject: Reply with quote

/sbin/runscript >/dev/null
might help
if not, you have to redirect every line in your wlanscript to /dev/null.

OTOH, you might want to see if there is an error in the script, then use ">/dev/null 2>&1"
Back to top
View user's profile Send private message
Florian
n00b
n00b


Joined: 26 May 2003
Posts: 4

PostPosted: Wed Apr 27, 2005 4:19 pm    Post subject: Reply with quote

Perfect, "/sbin/runscript >/dev/null" gave me only more errors but redirecting every line of wlanscript works fine.

Thanks,
Florian
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum