• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

I need help with a script...

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

Bender

Mysteriously Changing Senior
Joined
Dec 19, 2000
Location
In Thelemac's Basement Eating the Chickens
I have my script fully working but it needs a little cleaning up. I have it run when the system starts up but I do not want it displaying things like the network key. How can I hide the code execution?

Code:
#!/bin/sh
#
# Wireless USB setup for Syntax USB-400
#

# Enable wireless USB for wlan0
wlanctl-ng wlan0 lnxreq_ifstate ifstate=enable

# Set SSID for your network
set +v wlanctl-ng wlan0 lnxreq_autojoin ssid="MySSID" authtype=opensystem

# Set WEP attributes
set +v wlanctl-ng wlan0 lnxreq_hostwep encrypt=true decrypt=true
set +v wlanctl-ng wlan0 dot11req_mibset mibattribute=dot11PrivacyInvoked=true

# Set WEP key
set +v wlanctl-ng wlan0 dot11req_mibset mibattribute=dot11WEPDefaultKeyID=0
set +v wlanctl-ng wlan0 dot11req_mibset mibattribute=dot11WEPDefaultKey0=00:00:00:00:00

# Step 5 - set IP configuration
dhcpcd wlan0
 
Redirect the output to /dev/null if you don't want to see the ouput of your command. example:

Code:
dhcpd wlan0 2> /dev/null
 
goroX for dhcpcd that works but for other things is still displays text.

example
Code:
wlanctl-ng wlan0 lnxreq_ifstate ifstate=enable 2> /dev/null
When I addd 2> /dev/null it does nothing different.
 
Bender said:
goroX for dhcpcd that works but for other things is still displays text.

example
Code:
wlanctl-ng wlan0 lnxreq_ifstate ifstate=enable 2> /dev/null
When I addd 2> /dev/null it does nothing different.

Not sure what to tell you, but try to add & at the end to make it run in the background.

Code:
wlanctl-ng wlan0 lnxreq_ifstate ifstate=enable 2> /dev/null &
 
Back