OpenCSW Bug Tracker


Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003785 [cswclassutils] regular use minor have not tried 2009-07-28 20:37 2009-08-12 11:29
Reporter yann View Status public  
Assigned To bonivart
Priority normal Resolution fixed  
Status closed  
Summary 0003785: autoenable_specificdaemonname probably doesn't work
Description Hi,

Just had a look at i.cswinitsmf trying to solve a bug reported on my package, and I noticed the code used to evaluate autoenable_specificdaemonname is probably wrong.

The code is:

  if [ "$autoenable_$service" = "no" ]; then
    daemon=no
  elif [ "$autoenable_$service" = "yes" ]; then
    daemon=yes
  fi

but sh consider there are two variables $autoenable_ and $service.
$autoenable_ has never been set so it is "", so for exemple for opencsw sh will replace "$autoenable_$service" by "cswopenssh".

You could instead do:

eval autoenable_service="\$autoenable_$service"

and replace $autoenable_$service by $autoenable_service

Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0006525)
bonivart (developer)
2009-08-07 17:06

Thanks for noticing this, it's been there from the beginning! :-)

I will fix it (and http://www.opencsw.org/mantis/view.php?id=3764) [^] and release a beta.
(0006549)
bonivart (developer)
2009-08-10 17:16

New beta out with the below fix:

@@ -76,9 +78,10 @@
   if [ "$autoenable_daemons" = "no" ]; then
     daemon=no
   fi
- if [ "$autoenable_$service" = "no" ]; then
+ eval autoenable_service="\$autoenable_$service"
+ if [ "$autoenable_service" = "no" ]; then
     daemon=no
- elif [ "$autoenable_$service" = "yes" ]; then
+ elif [ "$autoenable_service" = "yes" ]; then
     daemon=yes
   fi

http://mirror.opencsw.org/testing/cswclassutils-1.18,REV=2009.08.10-SunOS5.8-all-CSW.pkg.gz [^]
(0006559)
bonivart (developer)
2009-08-12 11:29

Cswclassutils 1.18 released with fix.


Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker