diff options
author | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2019-07-14 22:19:39 +0100 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2019-07-14 22:19:39 +0100 |
commit | 8c6eb37874e9415338622fcf61e6a2c0b0b5311f (patch) | |
tree | 13a32258269c9bd4c9f778fd1cc864a6a70f96e5 /data/etc | |
parent | 51f8033fb30465d89fecf16a58e1d42c03f9b84d (diff) | |
download | enlightenment-8c6eb37874e9415338622fcf61e6a2c0b0b5311f.tar.gz |
sysactions - properly seed rfkill and l2ping paths from meson
we do binary discovery to generate a sysactions.conf for the host
system now for l2ping and rfkill commands. before they were hardcoded
paths. nice fixup for polishing the release
Diffstat (limited to 'data/etc')
-rw-r--r-- | data/etc/meson.build | 14 | ||||
-rw-r--r-- | data/etc/sysactions.conf.in | 6 |
2 files changed, 17 insertions, 3 deletions
diff --git a/data/etc/meson.build b/data/etc/meson.build index bd737062b3..5c0cc7f32d 100644 --- a/data/etc/meson.build +++ b/data/etc/meson.build @@ -5,6 +5,8 @@ HIBERNATE = '' MOUNT = '/bin/mount' UMOUNT = '/bin/umount' EJECT = '/usr/bin/eject' +L2PING = '/usr/bin/l2ping' +RFKILL = '/bin/rfkill' if host_machine.system().contains('bsd') == true #SUSPEND = 'acpiconf -s3' @@ -49,6 +51,16 @@ else endif endif +l2ping = find_program('l2ping', '/usr/bin/l2ping', '/bin/l2ping', '/usr/sbin/l2ping', '/sbin/l2ping', '/usr/local/bin/l2ping', '/usr/local/sbin/l2ping', required : false) +if l2ping.found() == true + L2PING = l2ping.path() +endif + +rfkill = find_program('rfkill', '/usr/bin/rfkill', '/bin/rfkill', '/usr/sbin/rfkill', '/sbin/rfkill', '/usr/local/bin/rfkill', '/usr/local/sbin/rfkill', required : false) +if rfkill.found() == true + RFKILL = rfkill.path() +endif + sysactions = configuration_data() sysactions.set('HALT' , HALT) sysactions.set('REBOOT' , REBOOT) @@ -57,6 +69,8 @@ sysactions.set('HIBERNATE', HIBERNATE) sysactions.set('MOUNT' , MOUNT) sysactions.set('UMOUNT' , UMOUNT) sysactions.set('EJECT' , EJECT) +sysactions.set('L2PING' , L2PING) +sysactions.set('RFKILL' , RFKILL) if get_option('install-sysactions') configure_file(input : 'sysactions.conf.in', diff --git a/data/etc/sysactions.conf.in b/data/etc/sysactions.conf.in index 4b799679ce..bb8984f519 100644 --- a/data/etc/sysactions.conf.in +++ b/data/etc/sysactions.conf.in @@ -50,9 +50,9 @@ action: hibernate @HIBERNATE@ action: /bin/mount @MOUNT@ action: /bin/umount @UMOUNT@ action: /usr/bin/eject @EJECT@ -action: l2ping /usr/bin/l2ping -action: rfkill-unblock /bin/rfkill unblock -action: rfkill-block /bin/rfkill block +action: l2ping @L2PING@ +action: rfkill-unblock @RFKILL@ unblock +action: rfkill-block @RFKILL@ block # root is allowed to do anything - but it needs to be here explicitly anyway user: root allow: * |