Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I need to execute the script after system boot. For example:

(sleep 5 && (sudo dhcpcd wlp4s0))

What I need: Executing the script. What I have: [sudo] password for eugene: I has been edited /etc/sudoers so:

eugene ALL=NOPASSWD: /home/eugene/dhcpcdstart.sh

But it's ineffectually. How I can to execute the current script without password? Arch Linux 2013.05.01

share|improve this question
5  
You should learn about the init scripts on Arch. I believe it uses systemd. Look up how to run scripts on startup using systemd. (When you find out, come back and post the answer. You are allowed and encouraged to answer your own questions. =D) –  daviewales May 18 '13 at 12:34

1 Answer 1

up vote 5 down vote accepted

First, listen to what @daviewales said and do this properly using the init system. It's as simple as:

systemctl enable dhcpcd@wlp4s0.service

Second, your sudoers modification doesn't work because you've added the wrong path there.

  • You added /home/eugene/dhcpcdstart.sh to sudoers...

  • ...but you're running sudo dhcpcd, i.e. sudo /usr/bin/dhcpcd.

share|improve this answer
    
Yes, but I need to start one script mode fur fully wifi working. Second script: sudo wpa_supplicant -Dwext -iwlp4s0 -c /etc/wpa_supplicant/wpa_supplicant.conf And second script should starting before dhcpcd. So I used the scripts, I don't know how to start this combination. –  Eugene Mironenko May 20 '13 at 4:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.