Bug 30268 - service sc status всегда возвращает 0
Summary: service sc status всегда возвращает 0
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: shapercontrol (show other bugs)
Version: unstable
Hardware: all Linux
: P3 normal
Assignee: Anton Farygin
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-30 01:57 MSK by Mikhail Efremov
Modified: 2014-08-30 14:23 MSK (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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)