Modify ↓
Ticket #926 (closed defect: fixed)
Rules - service check on localized systems
Reported by: | Thomas Ackermann <[email protected]…> | Owned by: | solj |
---|---|---|---|
Priority: | minor | Milestone: | Bcfg2 1.2.0 Release |
Component: | bcfg2-client | Version: | 1.0 |
Keywords: | Cc: | [email protected]… |
Description
chkconfigs output when system is not set to english is not interpreted correctly by the service rules.
for example:
/sbin/chkconfig --list nullmailer
< nullmailer 0:Aus 1:Aus 2:Ein 3:Ein 4:Ein 5:Ein 6:Aus
/sbin/chkconfig --list|grep :on
Found active services:
Verifying packa...
Attachments
Change History
comment:1 Changed 13 years ago by solj
- Milestone changed from Bcfg2 1.1.0 Release to Bcfg2 1.1.1 Release (Bugfix)
comment:2 Changed 13 years ago by solj
- Milestone changed from Bcfg2 1.1.1 Release (Bugfix) to Bcfg2 1.1.2 Release (Bugfix)
comment:3 Changed 12 years ago by solj
- Cc [email protected]… added
- Owner changed from desai to solj
- Status changed from new to accepted
Does the following patch correct the issue on your system?
diff --git a/src/lib/Client/Tools/Chkconfig.py b/src/lib/Client/Tools/Chkconfig.py index b7227ec..0d864e1 100644 --- a/src/lib/Client/Tools/Chkconfig.py +++ b/src/lib/Client/Tools/Chkconfig.py @@ -7,6 +7,9 @@ __revision__ = '$Revision$' import Bcfg2.Client.Tools import Bcfg2.Client.XML +# chkconfig localization mapping +CHKCFG_MAP = {'on': ['on', 'ein']} + class Chkconfig(Bcfg2.Client.Tools.SvcTool): """Chkconfig support for Bcfg2.""" @@ -27,7 +30,7 @@ class Chkconfig(Bcfg2.Client.Tools.SvcTool): srvdata = [line.split() for line in raw for pattern in patterns \ if pattern not in line][0] except IndexError: - # Ocurrs when no lines are returned (service not installed) + # Occurs when no lines are returned (service not installed) entry.set('current_status', 'off') return False if len(srvdata) == 2: @@ -40,7 +43,7 @@ class Chkconfig(Bcfg2.Client.Tools.SvcTool): try: onlevels = [level.split(':')[0] for level in srvdata[1:] \ - if level.split(':')[1] == 'on'] + if level.split(':')[1] in CHKCFG_MAP['on']] except IndexError: onlevels = [] @@ -91,7 +94,7 @@ class Chkconfig(Bcfg2.Client.Tools.SvcTool): def FindExtra(self): """Locate extra chkconfig Services.""" allsrv = [line.split()[0] for line in \ - self.cmd.run("/sbin/chkconfig --list|grep :on")[1]] + self.cmd.run("/sbin/chkconfig --list|grep -i :'on\|ein'")[1]] self.logger.debug('Found active services:') self.logger.debug(allsrv) specified = [srv.get('name') for srv in self.getSupportedEntries()]
comment:4 Changed 12 years ago by solj
- Milestone changed from Bcfg2 1.1.2 Release (Bugfix) to Bcfg2 1.2.0 Release
comment:5 Changed 12 years ago by solj
- Milestone changed from Bcfg2 1.2.0 Release to Bcfg2 1.3.0 Release
comment:6 Changed 12 years ago by solj
- Status changed from accepted to closed
- Resolution set to fixed
- Milestone changed from Bcfg2 1.3.0 Release to Bcfg2 1.2.0 Release
Fixed in 063aa802aa50d2a1d9ab7c4c5bb0454db9dc41ed.
Note: See
TracTickets for help on using
tickets.