Wireless network (and a shell script for you guys, also)

I don't know the right way to bring up my wireless iface at bootup, so I wrote a small shell script to do it for me.
Feel free to use it if you find it useful..
I'd also appreciate someone telling me what *IS* the arch way of doing what my shell script's doing
#!/usr/bin/env bash
# Val Polyakov <[email protected]>
# 7/8/07
# Change these to reflect your network
PATH=/usr/sbin:/sbin:/bin
IFACE=ifaceNameOfYourWirelessCard
DRIVER=moduleNameForYourWirelessCard
SID=yourSID
ENCKEY=yourEncryptionKey
# Don't change anything beyond this point.
case "$1" in
    start)
        echo "Loading the wireless card driver"
        modprobe $DRIVER
    echo "Setting up the SID and encryption key"
        iwconfig $IFACE essid $SID enc $ENCKEY
    echo "Bringing up the wireless interface"
    ifconfig $IFACE up
    if [ -f /var/run/dhcpcd-$IFACE.pid ]
    then
        rm /var/run/dhcpcd-$IFACE.pid
    fi
    echo "Running the dhcp client"
    dhcpcd $IFACE
    stop)
        echo "Bringing down the wireless interface"
    ifconfig $IFACE down
    echo "Unloading the driver"
    rmmod $DRIVER   
    restart)
        $0 stop
    sleep 2
        $0 start
        echo "usage: $0 {start|stop|restart}"
esac
exit 0

brain0 wrote:If your wireless drivers support wpa_supplicant, you could try autowifi from http://www.archlinux.org/~thomas/autowifi-svn/ It handles multiple wireless networks very well. There is no documentation right now, just read here: http://archlinux.org/pipermail/arch-dev … 00867.html
what would the benefit of that be, as compared to my script ?
the shell script i made (and pasted) works just fine, sits in /etc/rc.d and is called by /etc/rc.conf
i was just curious whats the official, i guess, way to do it with arch
since network profiles dont work for some reason, i figured i must be missing something..

Similar Messages

  • Time Capsule - Can it run as DHCP router, create a wireless network and plug into switch for wired network all at the same time?

    I have a closet with Wired connections from all over the house terminating in it. I also have the internet modem and a switch in this closet. My old setup was a netgear in the closet creating a wireless network and also feeding the Ethernet ports all over the house. In my room, I had an Airport express (a month old) bridging the wifi to make the wifi network larger. The Express was hard wired from the wall and my mac mini was using it's wifi (printer was plugged into other ethernet port). Everything was working great.
    Fast forward to last week. My Netgear died. So, I bought a time capsule. My plan was to move the Express to the closet and have it create the wifi network and also then run cat 5 cord from express to the switch to feed all the wired wall plugs. Reset it and set it up to create the wifi network as well as DCHP NAT. Wireless was running great on it. Then I plugged in the Cat 5 in the second Ethernet Port to the switch. Wifi stopped working and none of the computers would connect using wired connections either. They would see a 'network' but nothing would work. I would unplug the Cat 5 feeding the swtich and the wireless would start working again. Plug the Cat 5 back in and wireless would stop.
    So I thought I would try the Time Capsule in the closet and see if I could get it to work. Pretty much the same thing, except at this point I figured out if I went in and told it NOT to create a wifi network the wired portion worked fine and all the wired computers in the house worked fine. Of course, then I didn't have Wifi.
    I'm not clueless when it comes to networking, but I can NOT figure this out! Can either the Time Capsule or Express Create the wifi network AND also feed the data to the switch for all the wired computers?
    To simplify this is what I want my end result to be. I prefer the Time Capsule to be the wireless connection extender, but if I have to have the Express do it, I'm fine with that.
    1. Express in the closet creating the wifi network as well as feeding the data to the wired connections via my switch.
    2. have the Time capsule in my room at the opposite end of the house plugged into the hard wired connection to extend the wrieless network as well as have wired connections such as my printer and my Mac Mini.
    If I can get #1 to work, I don't think I'll have any problems with #2. Help!

    I have an equally complex setup with a managed switch actually but I have never seen the TC have this kind of issue.
    What I do notice is you have changed the TC from defaults.. you are using a non-default IP range.
    I have run across issues like this where people move things from default.
    I would like you to start over.. factory reset the TC. That will set it back to default router mode.
    Do the min setup on the TC..
    1. Change all names from what you were using. That includes the TC name and wireless name/s
    Make them short, no spaces and pure alphanumeric because that is the correct way to network. Apple default names with spaces and apostrophes are fundamentally bad.
    2. With just the TC plugged into the switch.. and a single computer connected by ethernet. Power cycle the whole network.. this allows the switch to clear all the old MAC address.
    3. Test on the computer just ethernet. Turn the wireless off.
    The computer must use dhcp and must get an ip from the TC.
    It has to get the correct Router.. ie Gateway.. I wish apple could stick with proper network terminology.
    And it must get same address or valid DNS server address/es.
    If it fails.. please plug ethernet directly to the TC.. bypassing the switch.
    You should get the standard IP addressing and internet connection.
    If not please post the screenshot from the Mac of the network preferences showing the ethernet setup.
    I need to see what address it does get. I need you to make sure the ethernet is the TOP of the list. So rearrange the order of network connection. With the airport off it should just go to the top of the list.
    If it appears to be working .. but a browser cannot connect, open a terminal and ping an internet address.
    Ping the actual gateway address the ISP gives you and ping the ISP dns address.

  • I hooked up new iMac to wireless network and now iPad and iPhone do not work using wireless.  I am using a Netgear N300 router.  Also my Netgear ethernet/homeplug for wireless TV internet no longer works.  Any ideas?

    I hooked up new iMac to wireless network and now iPad and iPhone do not work using wireless. They did before hooking up the iMac. I am using a Netgear N300 router.  Also my Netgear ethernet/homeplug for wireless TV internet no longer works.  Any ideas?  I have tried unplugging, restarting, and resetting.  No luck!  Thanks!

    You should probalby contact Netgear

  • Shell Script  for Startup and Shutdown the database

    Hi,
    i want Shell Script for Startup and Shutdown the database in Solaries.
    could any one can hep me where i can get this script. or send to me to [email protected]
    Thanks & Regards,
    Gangi reddy

    SHUTDOWN
    SHUTDOWN ABORT]
    Shuts down a currently running Oracle instance, optionally closing and dismounting a database.
    Terms
    Refer to the following list for a description of each term or clause:
    ABORT
    Proceeds with the fastest possible shutdown of the database without waiting for calls to complete or users to disconnect.
    Uncommitted transactions are not rolled back. Client SQL statements currently being processed are terminated. All users currently connected to the database are implicitly disconnected and the next database startup will require instance recovery.
    You must use this option if a background process terminates abnormally.
    IMMEDIATE
    Does not wait for current calls to complete or users to disconnect from the database.
    Further connects are prohibited. The database is closed and dismounted. The instance is shutdown and no instance recovery is required on the next database startup.
    NORMAL
    NORMAL is the default option which waits for users to disconnect from the database.
    Further connects are prohibited. The database is closed and dismounted. The instance is shutdown and no instance recovery is required on the next database startup.
    TRANSACTIONAL [LOCAL]
    Performs a planned shutdown of an instance while allowing active transactions to complete first. It prevents clients from losing work without requiring all users to log off.
    No client can start a new transaction on this instance. Attempting to start a new transaction results in disconnection. After completion of all transactions, any client still connected to the instance is disconnected. Now the instance shuts down just as it would if a SHUTDOWN IMMEDIATE statement was submitted. The next startup of the database will not require any instance recovery procedures.
    The LOCAL mode specifies a transactional shutdown on the local instance only, so that it only waits on local transactions to complete, not all transactions. This is useful, for example, for scheduled outage maintenance.
    Usage
    SHUTDOWN with no arguments is equivalent to SHUTDOWN NORMAL.
    You must be connected to a database as SYSOPER, or SYSDBA. You cannot connect via a multi-threaded server. For more information about connecting to a database, see the CONNECT command earlier in this chapter.
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a90842/ch13.htm#1013607
    Joel Pérez

  • EAP-TLS for Wireless network and PEAP for wired network

    Hello,
    it is possible to use EAP-TLS for Wireless network and PEAP for wired network on the same laptop (Windows 7).
    Thank you in advance.
    Thibault

    Yes, this is possible. You just need to properly configure each interface to use the EAP type you want.
    HTH,
    Steve
    Sent from Cisco Technical Support iPad App

  • Currently have house wide wireless network and using external HD (USB) for time machine. HD broken.  would Time capsule work with current routers etc or make them redundant?

    I currently have a large house wide wireless network and I am using a dedicated Buffalo HD with USB for time machine.  The HD has gone bad and can't be repaired. I am thinking of replacing it with a Time Capsule.  Will this fit in with my current routers etc, render them redundent ?   I THOUGHT THAT THE HD I BOUGHT WAS OF GOOD QUAILTY BUT IT HAS BROKEN AFTER 2 YEARS. HOW LONG CAN ONE HOPE FOR A TIME CAPSULE TO LIVE (USING QUALITY SURGE DEVICES ETC) ?  Does one need to backup the backups?
    ALSO: Is ther e any way to back up from Time Machine off site ( mobile me etc) in case the house burns down?

    Steve M. wrote:
    I know I should have redundant backups and should probably have a second external HD and eventually will.
    Yes, that's best.
    But for now, if I partition (I'm assuming I should) a new 1 TB external HD, how big should I make the TM partition vs. the SD partition at this point assuming I have under 100 GB on my internal Mac HD? Is this a feasible way of doing things here in the near term.
    Your best bet is to make your TM partition 2-3 times the size of the amount of data you anticipate backing-up. Put it first on the drive; that way, later on you can delete the partition below it, expand the TM partition, and make a new, smaller partition for SD (or use the whole drive). See #1, #3, #5 and #6 in the Frequently Asked Questions *User Tip,* also at the top of this forum, for details.
    By the way, any recommendations on which peripheral HDs to consider? I was very surprised on a recent visit to my local Apple Store that they have a large stock of WD My Studio drives. I mentioned to an Apple sales person that I had always heard WDs were kind of a no-no among Mac users but she assured me the current crop of them were much improved. Any comment on that??
    Most any drive will work with Macs, and Time Machine.
    If you're going to put a "bootable clone" on it, be sure it's a bootable drive. Most PPC Macs can boot only from FireWire; most Intels can boot from F/W or USB. But some Western Digitals won't boot a Mac. Their list of which ones should and +should not+ boot: http://wdc.custhelp.com/cgi-bin/wdc.cfg/php/enduser/stdadp.php?pfaqid=1787. But note the disclaimer that they don't support it +*at all.+*.
    In addition, many of them have a built-in sleep mode that cannot be disabled, and sometimes interferes with Time Machine backups: http://wdc.custhelp.com/cgi-bin/wdc.cfg/php/enduser/stdadp.php?pfaqid=1376

  • Want to create unix shell script for  Clone procedure in 11i and r12

    Want to create unix shell script for Clone procedure in 11i and r12 .Can anyone help me on this as I m new to oracle apps and scripting.
    Thanks in advance .

    user11958935 wrote:
    Thanks but I want it for application cloning ie adcfgclone and autoconfig etc .Please see old threads for similar topic/discussion.
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Automate+AND+Rapid+AND+Clone&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Automate+AND+AutoConfig&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks,
    Hussein

  • Shell script for batch compilation of forms 10g on AIX 5.3L AS

    Hi All,
    Can anybody provide me the Shell script for batch compilation of forms 10g and reports 10g on AIX 5.3L AS?
    Regards,
    SAM

    Hi Alex,
    I tried with the below script as well as the one you had posted.
    ORACLE_HOME=/opt/oracle/OraHome_3
    export ORACLE_HOME
    TNS_ADMIN=$ORACLE_HOME/network/admin
    export TNS_ADMIN
    LIBPATH=$ORACLE_HOME/lib32:$ORACLE_HOME/jdk/jre/bin:$ORACLE_HOME/jdk/jre/bin/cla
    ssic:$LIBPATH
    export LIBPATH
    cd ../forms
    for i in `ls *.pll`
    do
    echo Compiling Library $i ....
    $ORACLE_HOME/bin/frmcmp module=$i userid=mydbuser/mydbuser@mydb
    batch=yes module_type=library
    compile_all=yes window_state=minimize
    done
    export ORACLE_HOME=/opt/oracle/OraHome_3
    export ORACLE_TERM=vt220
    export LD_LIBRARY_PATH=/opt/oracle/OraHome_3/lib:/opt/oracle/OraHome_3/jdk/jre/l
    ib:/opt/oracle/OraHome_3/jdk/jre/lib/i386:
    cd ../forms
    for i in `ls *.pll`
    do
    echo "Compiling Library $i ...."
    /opt/oracle/OraHome_3/bin/frmcmp module_type=form userid=mydbuser/mydbuser@mydb
    module=$i batch=yes compile_all=no
    window_state=minimize upgrade=no
    done
    echo "PLL Compilation done"
    But there was a same kind of error thst turning up all the time.
    Compiling Library Agf.pll ....
    Forms 10.1 (Form Compiler) Version 10.1.2.0.2 (Production)
    Forms 10.1 (Form Compiler): Release - Production
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    PL/SQL Version 10.1.0.4.2 (Production)
    Oracle Procedure Builder V10.1.2.0.2 - Production
    Oracle Virtual Graphics System Version 10.1.2.0.0 (Production)
    Oracle Multimedia Version 10.1.2.0.2 (Production)
    Oracle Tools Integration Version 10.1.2.0.2 (Production)
    Oracle Tools Common Area Version 10.1.2.0.2
    Oracle CORE 10.1.0.4.0 Production
    FRM-10043: Cannot open file.
    Form not created
    I hence updated the permissions on the pll as below
    -rwxrwxrwx 1 oracle oinstall 335872 May 19 16:31 Agf.pll
    But the problem is still persisting.
    My environment details are as below.
    I am working on Win XP machine. Connected to my AS via telnet and xmanager. I have set my DISPLAY to my local IP.
    Is there any thing more that I need to do? If so then let me know.
    Regards,
    SAM

  • The Difference between Extending a Wireless network and WDS?

    I have an Extreme (n) and an Express (n).
    I want to make sure the signal is strong upstairs and share a printer (connected to the express) and use AirTunes. I also may add an external drive to the Extreme.
    What's the difference between Extending a Wireless Network and using WDS? Will there be a speed difference?
    Message was edited by: J. Christopher Edwards

    I think you don't get it
    If I have another draft N router that operates at 2.4G and I have only n devices I can still use WDS and it will connect using draft n in the 2.4G band.
    If one g device connects to the network will go in mixed mode.
    The AEBS will still report 130 Mbps for your n clients and 54 for your g clients.
    If the other router is g only obviously you can't connect between the two router at n mode but still the AEBS will be in mixed mode and not in g. The Extreme will still report 130 Mbps for the connected n clients.
    I can tell you that because I have actually implemented it am not taking off the documentation.
    The same device if I try to use the "extend n network" does not even see the AEBS but will happily keep the n in the WDS mode and though the bandwidth is halved it is still more than g.
    In any case enough for this!

  • Need Help in creating Unix Shell Script for database

    Would be appreciable if some one can help in creating unix shell script for the Oracle DB 10,11g.
    Here is the condition which i want to implement.
    1. Create shell script to create the database with 10GB TB SPACE and 3 groups of redo log file(Each 300MB).
    2. Increase size of redolog file.
    3. Load sample schema.
    4. dump the schema.
    5. Create empty db (Script should check if db already exists and drop it in this case).
    6. Create backup using rman.
    7. restore backup which you have backed up.

    This isn't much of a "code-sharing" site but a "knowledge-sharing" site.  Code posted me may be from a questioner who has a problem / issue / error with his code.   But we don't generally see people writing entire scripts as responses to such questions as yours.  There may be other sites where you can get coding done "for free".
    What you could do is to write some of the code and test it and, if and when it fails / errors, post it for members to make suggestions.
    But the expectation here is for you to write your own code.
    Hemant K Chitale

  • Shell script for archive log transfer

    hi
    I dont want to reinvent the wheel.
    I am looking for shell script for log shipping to provide standby db.
    What I want to do is, get the last applied archived log number from alert.log
    Copy the files from archive destination according to this value.
    Cheers

    If you don't want to re-invent the wheel you use Dataguard, no scripts.
    And your script should use the dictionary, instead of some bs method to read the alert.
    v$archived_log has all information!
    Also as far as I know, the documentation describes manual standby.
    So apparently you not only don't want to reinvent the wheel, but you want the script on a silver plate on your doorstep!
    Typical attitude of most DBAs here. Use OTN for a permanent vacation.
    Sybrand Bakker
    Senior Oracle DBA

  • Shell script for export backup in oracle 11g

    Hi,
    Oracle version 11.2.0..
    O/S-AIX
    How to write shell script for export full backup in oracle 11g and also need to remove 2 days of old backup.
    Regards,
    Raju

    How to write shell script for export full backup in oracle 11g
    Do you mean that export is your backup strategy ? is your database running in noarchivelog mode ? if so, then why ? if not so, then why not RMAN ?
    need to remove 2 days of old backup.
    If that mean remove files older than 2 days, you can use something like this :
    $ find <absolute directory path> -mtime +2 -exec rm {} \;

  • Shell script for DB backup

    HI,
    i have written some java code Database backup but there are some problems with that so now i need to write shell script for db backup.
    what i was doing in java code i was running command like that
    /usr/local/bin/tar cvzf /export/home/monitor/FILE_20091005.tar.gz FILES/*20091005.*which compress the all *20091005* files (myisam table files)
    but after compression file doesn't extract
    so i have to write shell script for that ..... can any body guide me how can i write that kind of script and put it in cron job.
    thanks

    soundar wrote:
    Hi all,
    I have migrated database from 8i to 10gr2.For Backup in 8i, we used a RMAN shell script (scheduled uding cron tab) to backup the database to Tape.(VERITAS BACKUP).
    I am new to 10G.I checked out the options to backup the database using Oracle Enterprise manager DB console.
    http://www.oracle.com/technology/obe/10gr2_db_single/ha/rman/rman_otn.htm#t1d
    I am planning to take a test backup using the steps mentioned inthe above url.Could any one suggest whcih is the best option for database backup,eiether to use Oracle Enterprise manager DB console or thru RMAN shell script for backup..?
    Edited by: soundar on Mar 9, 2010 10:53 PMDear soudar
    I woudn't suggest you to work with EM if you want to be a professional DBA. Start learning RMAN and use CLI instead of GUI
    Those who live by the GUI, die by the GUI

  • Shell script for DB

    Hi,
    I have written shell script for below scenarios, can you please guide me to write this as correct way, requirment is,
    1. i need to connect the database which is on unix server , but before connecting the DB some of the files needs to be removed from \tmp directory.
    2. once removed the script need to connect the database and call the sql file which is in \tmp directory.
    3. the output files will be stored in \tmp directory start with DB name.
    4. finally csv files needs to be transferred to local windows with help of FTP. please find below the script
    #!/bin/sh
    rm -f /tmp/dbmon/DB1*
    CONNSTRING=username/PASSWORD@service
    sqlplus -s $CONNSTRING @/tmp/STATS.sql << EOF
    EXIT;
    EOF
    HOST='xxxxx'
    USER='xxxxx'
    PASSWD='xxxxxx'
    FILE='E:\STATS\DB1.*'
    cd /tmp/dbmon
    ftp -n -v $HOST << EOT
    user $USER $PASSWD
    prompt
    mput $FILE
    bye
    EOT
    EXIT;
    EOF
    Thanks
    Edited by: ASP on Nov 18, 2011 4:45 PM

    Hi ASP
    It's always a good idea to write entries to timestamped log file without which you will never know where the script went wrong or failed.
    This is not tested but just a small example
    #!/bin/sh
    export LOG_DIR=/tmp/log
    export LOGFILE=$LOG_DIR/`basename $0`_${TIMESTAMP}.log
    if [ ! -d $LOG_DIR ]
    then
         mkdir $LOG_DIR
    fi
    echo "Removing the temporary files from /tmp/dbmon at `date +%Y%m%d_%H:%M:%S`" | tee -a $LOG_FILE
    rm -f /tmp/dbmon/DB1*
    CONNSTRING=username/PASSWORD@service
    echo "Run SQLPlus file" | tee -a $LOG_FILE
    sqlplus -s $CONNSTRING @/tmp/STATS.sql << EOF
    EXIT;
    EOF
    echo "Now FTP the files to windows box " | tee -a $LOG_FILE
    HOST='xxxxx'
    USER='xxxxx'
    PASSWD='xxxxxx'
    cd /tmp/dbmon
    ftp -vn $HOST <<EOF
    quote USER $USER
    quote PASS $PASSWD
    ascii
    cd E:\STATS
    mput DB1.*
    bye
    EOF

  • Shell scripting for sql queires

    Hi All,
    I have written 4 sql queires.now i want to write shell scripting for this.so please guide me in this issue..
    1. select * from emp;
    2. select * from dept;
    3. delete from emp;
    4. delete from dept;
    Thank you.

    Hi,
    Apologees for the c!=k!=b stuff. I guess it was to cryptic. It means
    C shell is not equal to Korne shell and both are not equal to Bourne shell.
    I can't provide you with any site for such stuff. Maybe Google might help? Or someone who is a nicer guy than me...

Maybe you are looking for