From unknown Thu Mar 28 20:17:21 2024 X-Loop: owner@bugs.devuan.org Subject: bug#319: openrc savecache doesnt run start() Reply-To: dxrobertson , 319@bugs.devuan.org Resent-From: dxrobertson Resent-To: devuan-bugs@lists.dyne.org Resent-CC: owner@bugs.devuan.org Resent-Date: Wed, 24 Apr 2019 22:03:01 UTC Resent-Message-ID: Resent-Sender: owner@bugs.devuan.org X-Devuan-PR-Message: report 319 X-Devuan-PR-Package: openrc X-Devuan-PR-Keywords: Received: via spool by 319-submit@bugs.devuan.org id=B319.155614320129945 (code B ref 319); Wed, 24 Apr 2019 22:03:01 UTC Received: (at 319) by bugs.devuan.org; 24 Apr 2019 22:00:01 +0000 Delivered-To: devuanbugs@dyne.org Received: from tupac3.dyne.org [195.169.149.119] by fulcanelli with IMAP (fetchmail-6.3.26) for (single-drop); Thu, 25 Apr 2019 00:00:01 +0200 (CEST) Received: from mail-ed1-f50.google.com (mail-ed1-f50.google.com [209.85.208.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by vm6.ganeti.dyne.org (Postfix) with ESMTPS id 2EBA3F60882 for <319@bugs.devuan.org>; Wed, 24 Apr 2019 23:58:19 +0200 (CEST) Authentication-Results: vm6.ganeti.dyne.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="j0Z491en"; dkim-atps=neutral Received: by mail-ed1-f50.google.com with SMTP id d46so17364441eda.7 for <319@bugs.devuan.org>; Wed, 24 Apr 2019 14:58:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=woxat73FyFUK5sozywdFQvTgIMFf9tmVQbSebiayfII=; b=j0Z491enI7x3fZFCXIORmeUXl8XezLVZh+mNfBVMnOvDzEGFiIpEqOI8IQpYbPhqol OrB2y1x7WZ9Dkx0uXvFMn/HpTxq7JO4GoPeiXXT7pBVHoszySMtaHN+6X85mV5w6D0PJ kFvN5vw3UlnITWhnNT0Bs+CLRiooOyCVEbzvvvNFvVd9We6TnDQjKx/jUM2mHVDAmgcF JA6qZjoWBARpyZ2sGxU+dUjocDcgLD8g7Bi6uIPhw4E2+KwLc64gqpxgT6WEuQJPAcul OQxtkcY6b48j3DqRRPCfIJPXLsrwux08svGW5OtholSFbhMthkqq2QaiAkBaSOKTbeOu O4Ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=woxat73FyFUK5sozywdFQvTgIMFf9tmVQbSebiayfII=; b=jGCh60MU3Lx0yM3H+ZkcSzHkrkPxThbGVH3rNFoPuwHyGosMKGCcFVs4voyKFh6PJF MRcPkgtXLINFxUvgdpXG2pxIt1x1kPn+ZmDXdy4o4/1n+FxpcouBhI+jqOaKlRXo40w3 Hsel+8ffNeeKyMVCaiPUz9ZJW7uM4v3N8U9BYv5b3xBIUcYQP//QEeJtjjU0fVBB1RRN BWTCqPtMTwbVIvzXAlCJhZsz9wUVkFBkFmpORrr/b2/6JOSErs9iY3zhrngLdN5RoCiy 6Qi3V89lB1aohPqoFyCbCLPCuO6fclUuE4jgy5a+EC/Db3lmU+jO+iZH+RhOaU6EMdfK yiZQ== X-Gm-Message-State: APjAAAXm7UC/WeX/cV3vF+92L7KgSDqAvIfUbJyV3h6gDybMuPzuHP+c sp9dsjde1Givwmlj1RsRbsoApMs0teXS6Al1c4FCa4s7w2U= X-Google-Smtp-Source: APXvYqxSQvBUs7ODr3T3gVPESKJSnpgKVRvuoPURbNMQ8G+mG66BhT4AQEM6TfYwwE4gVXl24zdpyygYcynbZjAapQc= X-Received: by 2002:a50:8c24:: with SMTP id p33mr22203622edp.210.1556143098437; Wed, 24 Apr 2019 14:58:18 -0700 (PDT) MIME-Version: 1.0 From: dxrobertson Date: Wed, 24 Apr 2019 17:58:05 -0400 Message-ID: To: 319@bugs.devuan.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_PASS autolearn=disabled version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tupac3.dyne.org I believe the problem to be in openrc-run.sh, the code at/around line 245: # Load our script lsbh=$(lsb2rcconf "$RC_SERVICE") if [ -n "${lsbh}" ]; then eval "${lsbh}" else sourcex "$RC_SERVICE" . . . I ran rc-service with the -d debug option: rc-service -dv savecache start Both with the LSB header present and not present, in /etc/init.d/savecache. When running WITH the LSB header present, variable lsbh becomes: + lsb2rcconf /etc/init.d/savecache + lsbh=depend () { provide _all } And subsequently, the code at line 247 gets run: if [ -n "${lsbh}" ]; then eval "${lsbh}" (This is the problem where savecache start() doesnt get run) When running WITHOUT the LSB header present, variable lsbh becomes: + lsb2rcconf /etc/init.d/savecache + lsbh= And subsequently, the "else" code at line 249 gets run: else sourcex "$RC_SERVICE" . . . (savecache start() runs) To resolve the problem, the LSB header could simply be removed from /etc/init.d/savecache. I wonder why LSB is being examined at all in openrc-run scripts, I thought (wrongly?) that LSB support was only added for /bin/sh run scripts, so to use the sysvinit scripts without modification, in openrc.