]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3533] do filename munging with variable expansions
authorPhilip Prindeville <philipp@redfish-solutions.com>
Sat, 3 Aug 2024 16:19:05 +0000 (10:19 -0600)
committerAndrei Pavel <andrei@isc.org>
Tue, 3 Sep 2024 07:29:12 +0000 (10:29 +0300)
src/bin/keactrl/keactrl.in

index a7cf355630136c9958fa13153590efb3f2742a86..78922929ea0d1b288482d0925cf22d6d8285522d 100644 (file)
@@ -118,7 +118,8 @@ get_pid_from_file() {
 
     # Extract the name portion (from last slash to last dot) of the config file name.
     local conf_name
-    conf_name=$(basename -- "${kea_config_file}" | rev | cut -f2- -d'.' | rev)
+    conf_name=${kea_config_file##*/}
+    conf_name=${conf_name%.*}
 
     # Default the directory to --localstatedir / run
     local pid_file_dir