Bug 30268

Summary: service sc status всегда возвращает 0
Product: Sisyphus Reporter: Mikhail Efremov <sem>
Component: shapercontrolAssignee: Anton Farygin <rider>
Status: CLOSED FIXED QA Contact: qa-sisyphus
Severity: normal    
Priority: P3 CC: rider
Version: unstable   
Hardware: all   
OS: Linux   

Description Mikhail Efremov 2014-08-30 01:57:42 MSK
Даже если сервис не стартовал status всегда возвращает 0.
Надо либо в самом shapercontrol что-то менять, либо грепать его вывод.
Comment 1 Anton Farygin 2014-08-30 10:01:01 MSK
это как воспроизвести ?

[root@riderkvmS ~]# shapercontrol status
verbose = 3
sc: no shaping rules found
[root@riderkvmS ~]# echo $?
3

можно увидеть вывод shapercontrol status в описываемой ситуации ?
Comment 2 Mikhail Efremov 2014-08-30 13:46:10 MSK
[root@c244 ~]# service sc status
sc: unable to read configuration file /etc/sc/sc.conf at /usr/sbin/shapercontrol line 625.
	main::log_carp('unable to read configuration file /etc/sc/sc.conf') called at /usr/sbin/shapercontrol line 350
sc: no shaping rules found
[root@c244 ~]# echo $?
0

Это при отсутствии /etc/sc/sc.conf совсем. При его наличии все равно видел 0, возможно при этом оно ругалось на какие-то параметры в конфиге (хотя start все равно правила применял).
Comment 3 Mikhail Efremov 2014-08-30 13:48:21 MSK
А, это только в init-скрипте проблема, похоже:
[root@c244 ~]# shapercontrol status
sc: unable to read configuration file /etc/sc/sc.conf at /usr/sbin/shapercontrol line 625.
	main::log_carp('unable to read configuration file /etc/sc/sc.conf') called at /usr/sbin/shapercontrol line 350
sc: no shaping rules found
[root@c244 ~]# echo $?
3
Comment 4 Mikhail Efremov 2014-08-30 13:54:31 MSK
Там просто опечатка
s/REVAL/RETVAL/
Comment 5 Repository Robot 2014-08-30 14:23:15 MSK
shapercontrol-1.5.1-alt5 -> sisyphus:

* Sat Aug 30 2014 Anton Farygin <rider@altlinux> 1.5.1-alt5
- fixed typo in iniscript (closes: #30268)