diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2014-09-25 16:48:37 +0800 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2014-09-26 05:42:54 +0200 |
commit | 3468c59c5cc382a66621bace78648479dc853db0 (patch) | |
tree | e8e676e8c0759e49241b7845ddc5b1481dad07b3 /meta-oe/recipes-extended/smartmontools/files | |
parent | 9ff03613176e6468d612ae95a392df583cd8f7ba (diff) | |
download | meta-openembedded-3468c59c5cc382a66621bace78648479dc853db0.tar.gz |
smartmontools: fix for its SysV init script
Changes include:
1. Make it run at runlevel 2, 3, 4 and 5 by default.
2. Add /etc/default/smartmontools, just as Ubuntu does.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-extended/smartmontools/files')
-rwxr-xr-x | meta-oe/recipes-extended/smartmontools/files/initd.smartd | 8 | ||||
-rw-r--r-- | meta-oe/recipes-extended/smartmontools/files/smartmontools.default | 6 |
2 files changed, 12 insertions, 2 deletions
diff --git a/meta-oe/recipes-extended/smartmontools/files/initd.smartd b/meta-oe/recipes-extended/smartmontools/files/initd.smartd index 29c27e475..54adcb406 100755 --- a/meta-oe/recipes-extended/smartmontools/files/initd.smartd +++ b/meta-oe/recipes-extended/smartmontools/files/initd.smartd | |||
@@ -16,8 +16,8 @@ | |||
16 | # Should-Start: sendmail | 16 | # Should-Start: sendmail |
17 | # Required-Stop: $syslog $remote_fs | 17 | # Required-Stop: $syslog $remote_fs |
18 | # Should-Stop: sendmail | 18 | # Should-Stop: sendmail |
19 | # Default-Start: | 19 | # Default-Start: 2 3 4 5 |
20 | # Default-Stop: 0 1 2 3 4 5 6 | 20 | # Default-Stop: 0 1 6 |
21 | # Short-Description: Monitors disk and tape health via S.M.A.R.T. | 21 | # Short-Description: Monitors disk and tape health via S.M.A.R.T. |
22 | # Description: Start S.M.A.R.T. disk and tape monitor. | 22 | # Description: Start S.M.A.R.T. disk and tape monitor. |
23 | ### END INIT INFO | 23 | ### END INIT INFO |
@@ -52,6 +52,10 @@ smartd_opts="--pidfile $SMARTDPID $smartd_opts" | |||
52 | 52 | ||
53 | case "$1" in | 53 | case "$1" in |
54 | start) | 54 | start) |
55 | if [ "$start_smartd" != "yes" ]; then | ||
56 | [ "$VERBOSE" != "no" ] && echo "Not starting S.M.A.R.T. daemon smartd, disabled via /etc/default/smartmontools" | ||
57 | exit 0 | ||
58 | fi | ||
55 | echo -n "Starting S.M.A.R.T. daemon: smartd" | 59 | echo -n "Starting S.M.A.R.T. daemon: smartd" |
56 | if start-stop-daemon --start --quiet --pidfile $SMARTDPID \ | 60 | if start-stop-daemon --start --quiet --pidfile $SMARTDPID \ |
57 | --exec $SMARTD_BIN -- $smartd_opts; then | 61 | --exec $SMARTD_BIN -- $smartd_opts; then |
diff --git a/meta-oe/recipes-extended/smartmontools/files/smartmontools.default b/meta-oe/recipes-extended/smartmontools/files/smartmontools.default new file mode 100644 index 000000000..602e00beb --- /dev/null +++ b/meta-oe/recipes-extended/smartmontools/files/smartmontools.default | |||
@@ -0,0 +1,6 @@ | |||
1 | # uncomment to start smartd on system startup for SysV init script | ||
2 | # For systemd service file, use `systemctl enable smartd'. | ||
3 | #start_smartd=yes | ||
4 | |||
5 | # uncomment to pass additional options to smartd on startup | ||
6 | #smartd_opts="--interval=1800" | ||