Control: tags -1 moreinfo Hi!
On Wed, 17 Apr 2024 17:17:39 +0300 "Dimitris T." <dimit...@stinpriza.org> wrote: > Package: runit-services > Version: 0.7.1 > Severity: wishlist > > Lorenzo hey, > > just tried smartmontools runscript found here : > https://git.devuan.org/xinomilo/runscript-collection/src/branch/master/smartmontools thanks for sharing it > > [...] > Did you take it from void linux? (I think I saw a similar finish file there) In any case I'm not convinced by the finish file: #!/bin/sh # no devices found, disable smartd [ $1 = 17 ] && sv d $(dirname $0) Ok, we don't want to keep restarting if there is a permanent failure condition, but there are others condition like this that are not catched by [ $1 = 17 ] I had a look at smartd(8) and found the '-q onecheck' option and I'm using it as a test, so the runscript becomes ------------------------------------------- #!/usr/bin/env /lib/runit/invoke-run sv start default-syslog || true if ! /usr/sbin/smartd -q onecheck ; then #no devices or other fatal problem sv d "${PWD##*/}" fi exec 2>&1 if [ "$VERBOSE" = 1 ]; then echo "Invoke-run: Starting $NAME" fi exec /usr/sbin/smartd -n $smartd_opts ------------------------------------------- and there is no need for the finish file. Could you test if it works for you? If you have a system with no devices suitable for smartd it should put the service down the same way as the finish file does. Best, Lorenzo > > thanks in advance, > d > > -- System Information: > Distributor ID: Devuan > Description: Devuan GNU/Linux 6 (excalibur/ceres) > Release: 6 > Codename: excalibur ceres > Architecture: x86_64 > > Kernel: Linux 6.8.6-3-liquorix-amd64 (SMP w/4 CPU threads; PREEMPT) > Locale: LANG=el_GR.UTF-8, LC_CTYPE=el_GR.UTF-8 (charmap=UTF-8), > LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash > Init: runit (via /run/runit.stopit) > > Versions of packages runit-services depends on: > ii runit 2.1.2-59 > ii runit-helper 2.16.2 > > Versions of packages runit-services recommends: > ii runit-init 2.1.2-59 > > Versions of packages runit-services suggests: > pn socklog <none> > > -- no debconf information