Skip to content

Instantly share code, notes, and snippets.

@grahamperrin
Last active December 15, 2016 05:57
Show Gist options
  • Save grahamperrin/83051b982c66fbec618847c3358066fc to your computer and use it in GitHub Desktop.
Save grahamperrin/83051b982c66fbec618847c3358066fc to your computer and use it in GitHub Desktop.
Experimenting with cosmetic improvements to outputs from OpenRC service (rc-service) commands in TrueOS
$ sudo service wpa_supplicant restart
Password:
wpa_supplicant | wpa_supplicant.wlan0 | * WARNING: wpa_supplicant.wlan0 is already started [ ! ]
$ service network.wlan0 status
* status: started
$ sudo service network.wlan0 stop
Password:
network.wlan0 | * caching service dependencies [ ok ]
network.wlan0 | dhcpcd.wlan0 | * stopping DHCP Client Daemon (wlan0) ... [ ok ]
network.wlan0 | wpa_supplicant.wlan0 | * stopping wpa_supplicant (wlan0) ... [ ok ]
$ service network.wlan0 status
$ sudo service network.wlan0 start
network.wlan0 | * caching service dependencies ... [ ok ]
$ drill
Error: error sending query: Error creating socket
$ sudo service wpa_supplicant.wlan0 start
wpa_supplicant.wlan0 | * starting WPA supplicant for wlan0 ...
wpa_supplicant.wlan0 | WPA supplicant started
wpa_supplicant.wlan0 | wlan0: ERROR: failed to initialize driver interface
wpa_supplicant.wlan0 | * start-stop-daemon: failed to start '/usr/local/sbin/wpa_supplicant' [ !! ]
wpa_supplicant.wlan0 | * ERROR: wpa_supplicant.wlan0 failed to start
$ sudo service wpa_supplicant.wlan0 restart
wpa_supplicant.wlan0 | * starting WPA supplicant for wlan0 ...
wpa_supplicant.wlan0 | WPA supplicant started
wpa_supplicant.wlan0 | wlan0: ERROR: failed to initialize driver interface
wpa_supplicant.wlan0 | * start-stop-daemon: failed to start '/usr/local/sbin/wpa_supplicant' [ !! ]
wpa_supplicant.wlan0 | * ERROR: wpa_supplicant.wlan0 failed to start
$ sudo service network restart
network | * WARNING: stopping a boot service [ ! ]
vboxnet | * stopping vboxnet ...
sysadm | * stopping SysAdm Server (WebSocket) ...
netmount | * unmounting network file systems ...
sshd | * stopping sshd ... [ ok ]
network | * stopping network ...
network | network.lo0 | * caching service dependencies ... [ ok ]
network | * starting network services ...
network | network.em0 | * caching service dependencies ... [ ok ]
network | network.em0 | * starting network (em0) ... [ ok ]
network | network.lo0 | * starting network (lo0) ... [ ok ]
network | * wlan0 created
netmount | * mounting network file systems ...
vboxnet | * starting vboxnet ... [ ok ]
sshd | * checking sshd configuration …
sshd | * starting sshd ...
sysadm | * starting SysAdm Server (WebSocket) ... [ ok ]
$ service network.wlan0 status
* status: started
$ sudo service wpa_supplicant.wlan0 start
wpa_supplicant.wlan0 | * starting WPA supplicant for wlan0 ...
wpa_supplicant.wlan0 | WPA supplicant started [ ok ]
$ sudo service dhcpcd.wlan0 start
dhcpcd.wlan0 | * starting DHCP client daemon for wlan0 ... [ ok ]
$
# mock-up to be compared with
# http://pastebin.com/raw/1QSsmCVU which originated from
# https://gist.github.com/grahamperrin/fa83b973a150eed0aaea60f9455e8973
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment