slonik@slonik-Lenovo-B570e:~$ echo '/var/run/dhcpd.pid rw,' | sudo tee -a /etc/apparmor.d/usr.sbin.dhcpd3
/var/run/dhcpd.pid rw,
slonik@slonik-Lenovo-B570e:~$ sudo /etc/init.d/isc-dhcp-server stop
Rather than invoking init scripts through /etc/init.d, use the service(

utility, e.g. service isc-dhcp-server stop
Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the stop(

utility, e.g. stop isc-dhcp-server
isc-dhcp-server stop/waiting
slonik@slonik-Lenovo-B570e:~$ sudo rm /var/run/dhcpd.pid
rm: невозможно удалить «/var/run/dhcpd.pid»: Нет такого файла или каталога
slonik@slonik-Lenovo-B570e:~$ sudo touch /var/run/dhcpd.pid
slonik@slonik-Lenovo-B570e:~$ sudo chown dhcpd:dhcpd /var/run/dhcpd.pid
slonik@slonik-Lenovo-B570e:~$ sudo /etc/init.d/apparmor restart
* Reloading AppArmor profiles Skipping profile in /etc/apparmor.d/disable: usr.bin.firefox
AppArmor parser error for /etc/apparmor.d/usr.sbin.dhcpd3 in /etc/apparmor.d/usr.sbin.dhcpd3 at line 1: syntax error, unexpected TOK_MODE, expecting TOK_OPEN
Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
[fail]
slonik@slonik-Lenovo-B570e:~$ sudo /etc/init.d/isc-dhcp-server start
Rather than invoking init scripts through /etc/init.d, use the service(

utility, e.g. service isc-dhcp-server start
Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the start(

utility, e.g. start isc-dhcp-server
isc-dhcp-server start/running, process 22305
slonik@slonik-Lenovo-B570e:~$ sudo /etc/init.d/slo_nik start
mv: не удалось выполнить stat для «/sbin/wpa_supplicant»: Нет такого файла или каталога
wpa_supplicant: процесс не найден
lo no wireless extensions.
wlan0 IEEE 802.11bgn ESSID:"OK"
Mode:Ad-Hoc Frequency:2.437 GHz Cell: Not-Associated
Tx-Power=15 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:on
eth0 no wireless extensions.
lo Interface doesn't support scanning.
wlan0 No scan results
eth0 Interface doesn't support scanning.
Rather than invoking init scripts through /etc/init.d, use the service(

utility, e.g. service isc-dhcp-server stop
Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the stop(

utility, e.g. stop isc-dhcp-server
isc-dhcp-server stop/waiting
Rather than invoking init scripts through /etc/init.d, use the service(

utility, e.g. service isc-dhcp-server start
Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the start(

utility, e.g. start isc-dhcp-server
isc-dhcp-server start/running, process 22481
dhcpd 22481 dhcpd 7u IPv4 193258 0t0 UDP *:67
Jun 8 01:17:32 slonik-Lenovo-B570e dhcpd: you want, please write a subnet declaration
Jun 8 01:17:32 slonik-Lenovo-B570e dhcpd: in your dhcpd.conf file for the network segment
Jun 8 01:17:32 slonik-Lenovo-B570e dhcpd: to which interface wlan0 is attached. **
Jun 8 01:17:32 slonik-Lenovo-B570e dhcpd:
Jun 8 01:17:32 slonik-Lenovo-B570e dhcpd:
Jun 8 01:17:32 slonik-Lenovo-B570e dhcpd: Not configured to listen on any interfaces!
Jun 8 01:17:32 slonik-Lenovo-B570e kernel: [ 18.974403] init: isc-dhcp-server main process (1376) terminated with status 1
Jun 8 01:17:32 slonik-Lenovo-B570e kernel: [ 18.974426] init: isc-dhcp-server respawning too fast, stopped
Jun 8 01:17:32 slonik-Lenovo-B570e dhclient: For info, please visit
https://www.isc.org/software/dhcp/Jun 8 01:17:43 slonik-Lenovo-B570e dhcpd: Wrote 1 leases to leases file.
Jun 8 01:17:43 slonik-Lenovo-B570e dhcpd: Can't create PID file /var/run/dhcpd.pid: Permission denied.
Jun 8 02:20:22 slonik-Lenovo-B570e kernel: [ 3787.094332] init: isc-dhcp-server main process (2293) killed by TERM signal
Jun 8 02:21:10 slonik-Lenovo-B570e kernel: [ 3835.112379] type=1400 audit(1339111270.371:29): apparmor="STATUS" operation="profile_replace" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=22187 comm="apparmor_parser"
Jun 8 02:21:10 slonik-Lenovo-B570e kernel: [ 3835.447969] type=1400 audit(1339111270.707:31): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/dhcpd" pid=22192 comm="apparmor_parser"
Jun 8 02:21:28 slonik-Lenovo-B570e dhcpd: Wrote 1 leases to leases file.
Jun 8 02:21:28 slonik-Lenovo-B570e kernel: [ 3853.000271] type=1400 audit(1339111288.271:46): apparmor="DENIED" operation="open" parent=1 profile="/usr/sbin/dhcpd" name="/run/dhcpd.pid" pid=22305 comm="dhcpd" requested_mask="r" denied_mask="r" fsuid=116 ouid=116
Jun 8 02:21:48 slonik-Lenovo-B570e dhcpd: receive_packet failed on wlan0: Network is down
Jun 8 02:21:58 slonik-Lenovo-B570e kernel: [ 3883.084924] init: isc-dhcp-server main process (22305) killed by TERM signal
Jun 8 02:21:59 slonik-Lenovo-B570e dhcpd: Wrote 1 leases to leases file.
Jun 8 02:21:59 slonik-Lenovo-B570e kernel: [ 3884.204322] type=1400 audit(1339111319.491:47): apparmor="DENIED" operation="open" parent=1 profile="/usr/sbin/dhcpd" name="/run/dhcpd.pid" pid=22481 comm="dhcpd" requested_mask="r" denied_mask="r" fsuid=116 ouid=116
root 1532 0.0 0.0 7256 1552 ? S 01:17 0:00 /sbin/dhclient -d -4 -sf /usr/lib/NetworkManager/nm-dhcp-client.action -pf /var/run/sendsigs.omit.d/network-manager.dhclient-eth0.pid -lf /var/lib/dhcp/dhclient-998b0ab5-cd98-4a82-98bf-1180d021d894-eth0.lease -cf /var/run/nm-dhclient-eth0.conf eth0
dhcpd 22481 0.0 0.1 18788 4456 ? Ss 02:21 0:00 /usr/sbin/dhcpd -f -q -4 -cf /etc/dhcp/dhcpd.conf wlan0
root 22496 0.0 0.0 14828 936 pts/2 S+ 02:21 0:00 grep dhcp\|wpa
ath9k 132390 0
mac80211 506816 1 ath9k
ath9k_common 14053 1 ath9k
ath9k_hw 411112 2 ath9k,ath9k_common
ath 24067 3 ath9k,ath9k_common,ath9k_hw
cfg80211 205544 3 ath9k,mac80211,ath
slonik@slonik-Lenovo-B570e:~$ iwlist scan
lo Interface doesn't support scanning.
wlan0 Scan completed :
Cell 01 - Address: 12:78:DB:1C:04:D3
Channel:6
Frequency:2.437 GHz (Channel 6)
Quality=70/70 Signal level=0 dBm
Encryption key:off
ESSID:"OK"
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s
9 Mb/s; 12 Mb/s; 18 Mb/s
Bit Rates:24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s
Mode:Ad-Hoc
Extra:tsf=0000000000000000
Extra: Last beacon: 13284ms ago
IE: Unknown: 00024F4B
IE: Unknown: 010882040B160C121824
IE: Unknown: 030106
IE: Unknown: 06020000
IE: Unknown: 32043048606C
IE: Unknown: DD070050F202000100
eth0 Interface doesn't support scanning.
slonik@slonik-Lenovo-B570e:~$