raster pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=8c6eb37874e9415338622fcf61e6a2c0b0b5311f

commit 8c6eb37874e9415338622fcf61e6a2c0b0b5311f
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Sun Jul 14 22:19:39 2019 +0100

    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
---
 data/etc/meson.build        | 14 ++++++++++++++
 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 bd737062b..5c0cc7f32 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 4b799679c..bb8984f51 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: *

-- 


Reply via email to