packages/net/kea/patches/004-replace-rev-with-awk.patch
Tiago Gaspar 7592e64f14 kea: update package to 1.8.0
Update kea to the latest stable version (1.8.0) and add kea-shell 
package.

Signed-off-by: Tiago Gaspar <tiagogaspar8@gmail.com>
2020-09-18 16:26:18 +01:00

11 lines
637 B
Diff

--- a/src/bin/keactrl/keactrl.in
+++ b/src/bin/keactrl/keactrl.in
@@ -98,7 +98,7 @@ get_pid_from_file() {
# Extract the name portion (from last slash to last dot) of the config file name
# File name and extension are documented in src/lib/util/filename.h
local conf_name
- conf_name=$(basename -- "${kea_config_file}" | rev | cut -f2- -d'.' | rev)
+ conf_name=$(basename -- "${kea_config_file}" | awk '{for(i=length($0); i>0;i--) printf (substr($0,i,1));}' | cut -f2- -d'.' | awk '{for(i=length($0); i>0;i--) printf (substr($0,i,1));}')
# Default the directory to --localstatedir / run
local pid_file_dir