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

  • 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

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.

  • 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

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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