Package: smartmontools
Version: 5.38-3
Severity: wishlist
Tags: patch
Here is a patch to add support for the "status" action to the init.d script.
diff -u smartmontools-5.38/debian/control smartmontools-5.38/debian/control
--- smartmontools-5.38/debian/control
+++ smartmontools-5.38/debian/control
@@ -11,7 +11,7 @@
Package: smartmontools
Architecture: any
Conflicts: smartsuite, ucsc-smartsuite
-Depends: ${misc:Depends}, ${shlibs:Depends}, debianutils (>= 2.2), lsb-base (>= 3.0-10)
+Depends: ${misc:Depends}, ${shlibs:Depends}, debianutils (>= 2.2), lsb-base (>= 3.2-13)
Recommends: mailx | mailutils
Description: control and monitor storage systems using S.M.A.R.T.
The smartmontools package contains two utility programs (smartctl and smartd)
diff -u smartmontools-5.38/debian/smartmontools.init smartmontools-5.38/debian/smartmontools.init
--- smartmontools-5.38/debian/smartmontools.init
+++ smartmontools-5.38/debian/smartmontools.init
@@ -125,8 +125,11 @@
fi
fi
;;
+ status)
+ status_of_proc -p "$PIDFILE" "$DAEMON" "smartd" && exit 0 || exit $?
+ ;;
*)
- echo "Usage: /etc/init.d/smartmontools {start|stop|restart|reload|force-reload}"
+ echo "Usage: /etc/init.d/smartmontools {start|stop|restart|reload|force-reload|status}"
exit 1
esac