Automatically launch wpa_cli on ttyE1

On my NetBSD system, the WPA connection seems to fail when wpa_cli is not running. So here’s how to start it automatically (and hiddenly) on the console.

Create the autologin script:

# cat > /root/wpa_cli

/usr/pkg/bin/sudo /usr/sbin/wpa_cli
exit 0
# chmod 755 /root/wpa_cli

Create the autologin user:

# sudo useradd -u 2010 -g wheel -c “Automatic login” -s /root/wpa_cli al

Edit the /etc/gettytab file:

# Automatic login

Edit the /etc/ttys file:

ttyE1 “/usr/libexec/getty al” vt220 on secure

Reboot and watch wpa_cli being started on ttyE1.

Author: Joel Carnat

@work Technical Architect and SysAdmin ; @home OpenBSD and FOSS, Karate, Kobudō, Jōdō, Bodyweight workout, Photography & Music

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.