Need shellscript to start wpa_supplicant on boot

Hi!
How do I make a script that starts wpa_supplicant, dhcpcd and maybe a shellscrpt to enable proxy for one specific network in the background in /etc/rc.d/*? I felt that netcfg did not work that good, because it has not that many options to define.

I'm sorry, but I don't know how to log the errors, if I don't stop the ever scrolling screen with ctrl+c, it will go on and on.
The permissions are fine, since the server is located in the home folder of the user. And if I run /usr/bin/screen -dmS minecraft /usr/bin/java -jar -Xms1024M -Xmx2048M /home/inchw0rm/minecraft_server.1.7.4.jar from terminal as a normal user, the server also starts OK.
I also found this thread, https://bbs.archlinux.org/viewtopic.php?id=155991 but it seems to me very unclear how this user modified the unit to get it working.
Last edited by Inchw0rm (2014-02-12 11:31:12)

Similar Messages

  • Dhcpcd does not start automatically on boot

    Hi everyone,
    I have just installed Arch (64 bit) and am running on a dynamic, wired connection.
    I followed the Beginners' Guide and enabled the dhcpcd service during the installation so that it would start automatically on boot.
    systemctl enable [email protected]
    However, I currently must issue the command "dhcpcd" each boot before the internet starts to work.
    Does anyone know how I can automate this process or if I need to further configure my network connection?
    Thank you in advance.
    Last edited by Ipozya (2012-11-15 11:29:05)

    foppe wrote:
    Check the output from
    # systemctl status [email protected]
    to debug the issue you're experiencing.
    % sudo systemctl status [email protected]
    [email protected] - dhcpcd on eth0
    Loaded: loaded (/usr/lib/systemd/system/[email protected]; enabled)
    Active: failed (Result: exit-code) since Tue, 2012-11-15 20:38:16 GMT; 27 sec ago
    Process: 244 ExecStart=/sbin/dhcpcd -A -q -w %I (code=exited, status=1/FAILURE)
    CGroup: name=systemd:/system/[email protected]/eth0
    Nov 15 20:37:47 arch dhcpcd[244]: eth0: sending IPv6 Router Solicitation
    Nov 15 20:37:47 arch dhcpcd[244]: eth0: sendmsg: Cannot assign requested address
    Nov 15 20:37:47 arch dhcpcd[244]: eth0: broadcasting for a lease
    Nov 15 20:37:51 arch dhcpcd[244]: eth0: sending IPv6 Router Solicitation
    Nov 15 20:37:55 arch dhcpcd[244]: eth0: sending IPv6 Router Solicitation
    Nov 15 20:37:59 arch dhcpcd[244]: eth0: sending IPv6 Router Solicitation
    Nov 15 20:37:59 arch dhcpcd[244]: eth0: no IPv6 Routers available
    Nov 15 20:38:16 arch dhcpcd[244]: timed out
    Nov 15 20:38:16 arch systemd[1]: Failed to start dhcpcd on eth0.
    Nov 15 20:38:16 arch systemd[1]: Unit [email protected] entered failed state
    Dhclient did not work automatically on boot either.
    Others seem to have experienced similar issues but I don't see any real solutions in any of these posts, despite being marked as solved. For example, adding "-t 120" to the dhcpcd start line in /usr/lib/systemd/system/[email protected] did not work for me.
    I also tried the following but it did not work either and I had to issue "dhcpcd" before internet started working.
    Install and configure wired and wireless networking
    # pacman -S netcfg ifplugd
    # cd /etc/network.d
    # ln -s examples/ethernet-dhcp .
    Make sure the WIRED_INTERFACE and WIRELESS_INTERFACE lines is uncommented
    # nano /etc/conf.d/netcfg
    # systemctl enable net-auto-wired.service
    # pacman -S wireless_tools wpa_supplicant wpa_actiond dialog
    # systemctl enable net-auto-wireless.service
    https://bbs.archlinux.org/viewtopic.php?pid=1176656
    https://bbs.archlinux.org/viewtopic.php?pid=1189587
    https://bbs.archlinux.org/viewtopic.php?pid=1180192
    Last edited by Ipozya (2012-11-15 21:08:03)

  • I bought windows 7 download online and started setting up boot camp but it says to insert the windows 7 disk so how do i do this?

    i bought windows 7 download online and started setting up boot camp but it says to insert the windows 7 disk so how do i do this?
    plz help me

    Hi Jaimie,
    To install Windows via Boot Camp you will need to have a copy of Windows on a physical dvd disc.
    If your purchase provides you with an ".ISO" file then you can simply burn this to a DVD and then follow the standard Boot Camp installation instructions.
    Boot Camp instructions: http://manuals.info.apple.com/en_US/boot_camp_install-setup_10.7.pdf
    If you get stuck, just let me know the website you purchased Windows 7 from and I might be able to help you out.
    Cheers

  • I have an imac 2009 the disk drive is damaged and I have lost the passwords I need to reset passwords I tried booting with a macosx disk from an external hard drive but did not read the drive how else can I reset password ?

    I have an imac 2009 the disk drive is damaged and I have lost the passwords I need to reset passwords I tried booting with a macosx disk from an external hard drive but did not read the drive how else can I reset password ?
    I have a 2012 mac book pro can I use that to connect with firewire and load osx that way? and how woudl I do that?
    Thanks so much!

    To what password are you referring? Do you mean your user account's admin password? Or do you mean the master password for File Vault or do you mean a Firmware Password?
    For an admin password:
    Forgot Your Account Password
    For Snow Leopard and earlier
         Mac OS X 10.6- If you forget your administrator password
    For Lion/Mountain Lion
        Boot to the Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
         When the menubar appears select Terminal from the Utilities menu.
         Enter resetpassword at the prompt and press RETURN. Follow
         instructions in the dialog window that will appear.
         Or see Reset a Mac OS X 10.7 Lion Password and
         OS X Lion- Apple ID can be used to reset your user account password.
    If you cannot do the above then try this:
      1. Boot to Safe Mode by restarting and after the chime press and hold down the COMMAND-S keys until a black screen with white type appears.
      2. At the prompt, type the following commands pressing return after each command line:
         /sbin/fsck -yf
         If you do not receive a "Filesystem OK" message then repeat this command until
         you do.  If after seven tries you still do not receive a "Filesystem OK" message,
         then the system is corrupted and needs to be reinstalled.
         mount -uw /
         cd /private/var/db/netinfo
         mv local.nidb local.old
         rm ../.AppleSetupDone
         shutdown -r now
    The second-to-last command above will cause OS X to think that the operating system is newly installed, and when the new owner starts up the computer it will send him/her to the startup wizard where he/she can start a new user without reinstalling.
    This last method does not actually change a password. It simply removes the user accounts and lets you create an initial admin account as if the computer were new out of the box.
    How to reset the OS X password without a startup CD:
    Reboot into Single-user Mode. Enter the following and press RETURN after each command line
       1. Type fsck -fy
       2. Type mount -uw /
       3. Type passwd <username>
    I have never tried this method myself.

  • On system start up safari boots up and shortly after chrome boots up. why? I do not want chrome to boot up.

    on system start up safari boots up and shortly after chrome boots up. why? I do not want chrome to boot up..  What do I need to do?

    It's likely that one of your login items is causing the problem. Select the Login Items tab in the Users & Groups pane of System Preferences. Delete any items that you don't recognize. If you're not sure which ones to delete, double-click each to test it.

  • How do I start slapd at boot time in leopard?

    Greeting,
      Forgive me if this is the wrong forum/community.
      I want to start slapd at boot time on my new leopard upgrade.  On tiger, it was as simple as having an LDAPSERVER=-YES- line in /etc/hostconfig.  That does not seem to work for leopard.  I can run slapd from the command line.  I needed to make changes to the slapd.conf tiger version and reload my database, but all is working fine.  I just have not been able to get the deamon to start at boot up.  It must be simple.  Any ideas?
      Thanks,
    --Linn

    Texas Mac Man,
      Thanks.  Slapd is the OpenLDAP daemon (server) delivered with MacOS, even Client.  No, starting at the user level is not what I need.  I can already do that in a terminal window with /usr/libexec/slapd, after I get su'ed to root.
      Think Unix, not iApps.  When the system boots up, there should be scripts available to start specific daemons.  I am looking for hints there.
    BDAqua,
      Thanks.  I had seen that first discussion before.  It deals with slapd failing when it tries to start on MacOS Server... where all these daemons indeed start at boot time.  I am just trying to figure out how to do in leopard what I successfully did in tiger, namely start /usr/libexec/slapd at boot time.
      And note, this is not an issue with slapd failing due to slapd.conf or database problems.  All works fine from the user lever start.
      Thanks,
    --Linn

  • HT5639 When I start up in Boot Camp it says that updates weren't properly installed and the system is reloading.  It then automatically restarts in Mountain Lion. What is wrong?

    When I start up in Boot Camp it says that updates weren't properly installed and the system is reloading.  It then automatically restarts in Mountain Lion. What is wrong?
    I am currently using Windows 8 and also have Microsoft office installed but those are the only thing on my partitioned space.  I don't know if I installed 32 or 64 version of Windows 8.  Could that be the problem?

    Can you deal with XP not being supported by Apple and Microsoft? no security etc?
    Can you use Windows in a VM instead of natively?
    All the drives other than the one with XP will need to be pulled.
    Always have backups of your system, clone that you can boot from.
    Boot Camp 3.0 was the last supported. You don't need OEM 10.4.6 DVD and your system with EFI and SMC updates (Aug/Sept 2007) may not like it.
    32-bit version of Windows on EFI-32 will only get 1.9GB RAM.
    Installing 64-bit Windows 7 is a bit harder. Vista pre-SP1 64-bit was the best match for install on my 1,1 and that was 2006-2007.
    The new owner needs to deal with this, not you. And really they are better off with a $400 PC instead. Or use a VM.
    the owner should put in a new SSD for the system and $44 buys 4 x 2GB RAM. Together it will run just fine. 500GB SSD now $250 / $135 250GB. Biggest issue is a video card on these.
    The grey screen - you upgraded the graphic card perhaps.
    Unplug everything. Hit power for 5-10 seconds. Reconnect cables for mouse/kb and power, and monitor. You just reset SMC. Yes there is a small button - pull drive #4 and any controller in top slot #4 to see the SMC motherboard reset button but you don't need to.
    Any PCIe cards can also play a role and factor into XP or Windows not working.

  • IMac powers down while starting in safe boot mode

    My 2014 21" iMac powers itself down after about 10 seconds while trying to startup in safe boot mode. I'm not even sure why it is trying to start in safe boot mode. I shut it down after a power outage while plugged into an APS UPS. I'm guessing that since I interrupted the auto shutdown it is restarting in safe boot mode. Either way, I get a grey screen with a big apple and a progress bar. The progress bar gets to about a tenth full and the power just shuts off.
    I've tried starting up while holding the alt key to select the Macintosh HD. The same thing happens.
    I'm not particularly tech savvy. Any ideas are appreciated.

    Thank you for the clarification and link. I ran the disk utility on Macintosh HD and it said it can't repair the disk, and that I need to reformat and restore. It has an invalid node structure. All of this happened just because I shut it down presumable while it was already trying to shut itself down after talking to the UPS?
    At least I use Time Machine.
    Thank you again.

  • My mac book air keeps starting in safe boot mode. I cant enter my password as it is caps lock so i cant access my computer. Please can someone please help me start back in normal mode? Thank you

    MY Macbook air keeps starting in "safe boot" mode, no idea why. I cannot get into the system because this mode makes everything write in capital letters and my password is in lower case. I keep turning it off and on but nothing changes and i cannot access my computer. Please can someone help me? Thank you

    I'm not getting a clear picture at all of what problems you're seeing. If you are seeing online accounts have their passwords changed, those accounts are being hacked. Someone may already have access to some account and is using that access to reset passwords on other accounts. Change the password on EVERY online account you have. Be sure to use a strong password, and don't use the same password on more than one site.
    If you are seeing changes to your bookmarks and browser history, your Apple ID may be one of the accounts that has been hacked. After changing the password on your Apple ID, you need to lock it down with two-factor authentication:
    http://support.apple.com/kb/ht5570
    Beyond that, we will need additional details about what specific symptoms you're seeing in order to help further. One thing I can say, though, is that these problems are very unlikely to be due to any kind of malware. See my Mac Malware Guide to learn more on that topic.

  • Start XAMPP on boot

    Hi all,
    total newbie trying to figure out how to start xampp on boot. I understand that i need to place a script file in /etc/init.d/ but i can't seem to locate the file to put there, what does it look like or how do i create it?
    Thanks!

    Take a look at one of the (simpler) files in /etc/rc2.d or /etc/rc3.d (perhaps the one that starts SSH). Rename and modify it for your purposes.
    A file that is
    *) in one of those directories
    *) begins with the letter 'S'
    will be run by '/sbin/sh' with the word 'start' as the first argument.
    Pretty simple. If you just want it to start, it could just be a one liner. Most "startup" scripts tend to be slightly more elaborate, normally examining the first argument for 'start', 'stop' or in some cases 'restart' or 'status'.
    Standard is for the script to also be linked into /etc/init.d, but files in that directory are never executed directly by the system.

  • How to automatically start postfix on boot?

    I often need postfix to send e-mail. To use postfix I need to start postfix everytime manually via the Terminal commandline.
    I would like to have postfix to be started automatically with booting.
    Is this possible in Mac OS X Snow Leopard? How can it be done?

    There is already an org.postfix.master.plist file in /System/Library/LaunchDaemons
    I had an old copy of Postfix Enabler from http://cutedgesystems.com/ but didn't appreciate having to buy a new program when Leopard came out, so I rolled my own. Here is my edited org.postfix.master.plist:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>Label</key>
    <string>org.postfix.master</string>
    <key>OnDemand</key>
    <false/>
    <key>Program</key>
    <string>/usr/libexec/postfix/master</string>
    <key>ProgramArguments</key>
    <array>
    <string>master</string>
    </array>
    <key>QueueDirectories</key>
    <array>
    <string>/var/spool/postfix/maildrop</string>
    </array>
    </dict>
    </plist>
    This will enable you to send mail. You can setup your Mac to receive mail too, but that is a bit more involved.

  • Need help to start with some file and text manipulation

    Hello script mavens,
    I need help with starting a script that does the following:
    -within a base folder it takes an inventory (list?) of all the files (which happen to be image files).
    -creates a new folder inside the base folder and calls it imagesX where X increases by one every time the script is run
    -moves all the files into the images folder
    -within the base folder it creates a new text file and calls it imagesX.js
    -writes a "//-" into imagesX.js
    -then writes the list of filenames into the imagesX.js twice, separated by an empty line, and adds a semicolon to the end of each filename and saves imagesX.js
    -from a folder a level above the base folder it copies a file called index.html into the base folder and renames in indexX.html
    -in indexX.html it replaces a string "replaceThis" with "imagesX.js"
    The task is more complex but this would help me tremendously do the rest.
    If I am asking for too much on this forum please let me know

    This should get you started.
    The description of how you want to write the data isn't clear, but the rest should work (untested):
    property imageNum : 0 -- last used ImageNumber
    -- within a base folder it takes an inventory (list?) of all the files (which happen to be image files).
    -- get the folder:
    set baseFolder to (choose folder)
    -- now get the files within it:
    tell application "Finder"
    set fileList to every file of folder baseFolder as alias list
    end tell
    --creates a new folder inside the base folder and calls it imagesX where X increases by one every time the script is run
    tell application "Finder"
    set imageNum to imageNum + 1
    set newImageFolder to make new folder at baseFolder with properties {name:"images" & imageNum}
    -- moves all the files into the images folder
    move every file of folder baseFolder to newImageFolder
    --within the base folder it creates a new text file and calls it imagesX.js
    set textFile to (open for access file (baseFolder as text) & "images" & imageNum & ".js" with write permission)
    --writes a "//-" into imagesX.js
    write "//-" to textFile
    -- then writes the list of filenames into the imagesX.js twice, separated by an empty line, and adds a semicolon to the end of each filename and saves imagesX.js
    -- need more info here
    -- a blank line between each instance of the file name? or all file names, blank line, all file names again?
    -- an example, please
    close access textFile
    --from a folder a level above the base folder it copies a file called index.html into the base folder
    --and renames in indexX.html
    --in indexX.html it replaces a string "replaceThis" with "imagesX.js"
    -- the easiest way of doing this is to read the file and write a new copy with the changes - that's easier than changing it in situ:
    set indexHTML to (read file "index.html" of folder (container of baseFolder))
    set {oldTIDs, my text item delimiters} to {my text item delimiters, "replaceThis"}
    set indexHTML to text items of indexHTML
    set my text item delimiters to "imagesX.js"
    set indexHTML to indexHTML as text
    set my text item delimiters to oldTIDs
    set indexFile to (open for access file ("index" & imageNum & ".html") with write permission)
    write indexHTML to indexFile
    close access indexFile
    end tell

  • Btsync not starting correctly at boot

    Hi all,
    I have installed Btsync with the help of this nice guide:
    https://wiki.archlinux.org/index.php/BitTorrent_Sync
    Running this on the RaspberryPi.
    And it starts when I boot but it does not show any logs (systemctl status btsync@username)  and the GUI does not work until I do a
    systemctl restart btsync@username
    What shall I do?
    Regards
    Kristofer

    Service file:   [email protected]
    [Unit]
    Description=Bittorent Sync service for %i
    After=network.target
    [Service]
    User=%i
    ExecStart=/usr/bin/btsync --config %h/.config/btsync/btsync.conf --nodaemon
    Restart=on-abort
    [Install]
    WantedBy=multi-user.target
    After a reboot when the btsync does not work:
    systemctl status btsync@xx
    [email protected] - Bittorent Sync service for xx
    Loaded: loaded (/usr/lib/systemd/system/[email protected]; enabled)
    Active: active (running) since Thu 1970-01-01 01:00:23 CET; 44 years 0 months ago
    Main PID: 143 (btsync)
    CGroup: /system.slice/system-btsync.slice/[email protected]
    `-143 /usr/bin/btsync --config /home/xx/.config/btsync/btsync.c...

  • How to start tomcat at boot on 10.8

    I have been trying for days to get Tomcat to start on system boot. I have it working fine as an launch daemon when I log on, but I want it to start when the system starts.  I have installed the plist to start tomcat in /System/Library, changed the ownership to root:wheel, ensured that the script it runs is accessible and workable, but no luck.  Where am I going wrong.

    I have been trying for days to get Tomcat to start on system boot. I have it working fine as an launch daemon when I log on, but I want it to start when the system starts.  I have installed the plist to start tomcat in /System/Library, changed the ownership to root:wheel, ensured that the script it runs is accessible and workable, but no luck.  Where am I going wrong.

  • Macbook upgrade to Lion.. how do i minimize what applications start up from boot ?

    how do i minimize what applications start up from boot (start-up) ??
    excel, word, safari and mail are all opening
    takes too long

    Disable Resume...
    How To Disable Lion's 'Resume' Feature - MacRumors.com
    And if you restart your Mac from the Apple menu > Restart
    Deselect:   Reopen windows when logging back in

Maybe you are looking for

  • Toshiba 46TL968G HowTo add apps and Problem with flash in Webbrowser

    Hi all, I have 2 problems regarding Toshiba 46TL968G. 1) is that possible to install apps on this TV? I searched online that TOSHIBA ePortal could be used to add Apps, but I cannot find it in 46TL968G. Is it supported by this model?  - If yes, how ca

  • Lock and Unlock ?

    Hi, i am submititing the  report "rm06k052"(Transaction- MEKL) via job in background. Suppose if one scheduling agreement contains several no of line items and for materials i have to change the price. So i m calling for each and every line item. Whe

  • Change of sign(+/-) in report

    Hi   In an report i have an key figure (Total spend) The value that shows me in the report is -ve but I need to display it as positive. (E.g): The existing value in the report shows up -20 Now i will have to change the valu to +20. Is there any optio

  • Curiosity: importData error

    To import an XML I use the expression: xfa.host.importData(sFile); sFile is the name of the XML to import. It seems to work well, but on the warning ads tag of the program I always see an error that says that there is a command sequence error(Javascr

  • Several .Mac group members working on one iWeb site

    How could I do to allow another member of my dotmac group to edit our iWeb Site ? Should I put the Domain file in iWeb/Groups/my_group/Documents and a link in the username/App Support/iWeb directory ? Does this work ? Is there a simple way for severa