From owner-freebsd-rc@freebsd.org Thu Aug 1 13:17:18 2019 Return-Path: Delivered-To: freebsd-rc@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 35FFCBD7D4; Thu, 1 Aug 2019 13:17:18 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 45zrRx1gx3z4d1D; Thu, 1 Aug 2019 13:17:16 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-pg1-f173.google.com with SMTP id i18so34200350pgl.11; Thu, 01 Aug 2019 06:17:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:from:subject:openpgp:message-id:date :user-agent:mime-version:content-language:content-transfer-encoding; bh=znxSz+RObypHhIb+VNBPGcSNHT5/paH1NLG4CeX+pMo=; b=YGbxQUWBDLmrg3/4uaa7cRhrUwTmrTovQheHNVvDk6twUtOttKXNBWHHrjQY38Bh08 4JXZzVQAkuOItjU6kEZe6P+5T3N2a3qyDk6QxwGCoaeEY6FfZEBth79tecsMBPeZ3ouS 93BxzXOm3how+zyVRmrWFOQ5zNnNjy9Ih8pa1RqKaKR4+jDgaDMIrHx4EkEpBguKe1bR p7nwbx+MPLqHDhTxS3X1lrkq5TqbdBHmSuFb/B/gnsVu4ALMpsNfRMjAYwm/1LQL9XoU hhhERs1XSSMGVFERvXMyCKaraN+5jXIjdOqLBqf8BAmLDAslE5Ble4WaCEoIq3dbHMSR 3hTw== X-Gm-Message-State: APjAAAVp4n13fG6OjVoAK9s9oSXMqNNFs8M2Rzy1PxN45o46cTQ7Tg8K LNYqedm3IrobHcDMb/XLdw/7tok2Rs8= X-Google-Smtp-Source: APXvYqxPyR3gI9PYKLkB63hAwSq/Rw+fRp931XNf4gukSWf/lPu4fc7XpI5eEnJOtELMs24bNfg6Cw== X-Received: by 2002:a62:26c1:: with SMTP id m184mr51299629pfm.200.1564665434961; Thu, 01 Aug 2019 06:17:14 -0700 (PDT) Received: from [192.168.1.36] (broadband-95-106-143-130.atc.tvcom.ru. [95.106.143.130]) by smtp.googlemail.com with ESMTPSA id b26sm81417394pfo.129.2019.08.01.06.17.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Aug 2019 06:17:13 -0700 (PDT) To: freebsd-rc@freebsd.org Cc: FreeBSD Current From: Andriy Gapon Subject: rc script: manual stop vs system shutdown Openpgp: preference=signencrypt Message-ID: <2e50fb67-8a19-412b-19d2-14f5f20b61f8@FreeBSD.org> Date: Thu, 1 Aug 2019 16:17:09 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 45zrRx1gx3z4d1D X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of agapon@gmail.com designates 209.85.215.173 as permitted sender) smtp.mailfrom=agapon@gmail.com X-Spamd-Result: default: False [-5.13 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[FreeBSD.org]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(-3.14)[ip: (-9.80), ipnet: 209.85.128.0/17(-3.41), asn: 15169(-2.45), country: US(-0.05)]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[173.215.85.209.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; FORGED_SENDER(0.30)[avg@FreeBSD.org,agapon@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[173.215.85.209.rep.mailspike.net : 127.0.0.17]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[avg@FreeBSD.org,agapon@gmail.com]; MID_RHS_MATCH_FROM(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[130.143.106.95.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11] X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Aug 2019 13:17:18 -0000 Is it possible in an rc script to distinguish between a manual stop (e.g., service foo stop) and a stop during a system shutdown (via rc.shutdown) ? Are there any marker variables for that? Or something in the global system state? Thanks! -- Andriy Gapon