From owner-freebsd-questions@freebsd.org Thu Jun 14 00:20:18 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B538100615A for ; Thu, 14 Jun 2018 00:20:18 +0000 (UTC) (envelope-from jude.obscure@yandex.com) Received: from forward105p.mail.yandex.net (forward105p.mail.yandex.net [77.88.28.108]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Yandex CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B08FA84CCC for ; Thu, 14 Jun 2018 00:20:17 +0000 (UTC) (envelope-from jude.obscure@yandex.com) Received: from mxback1o.mail.yandex.net (mxback1o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::1b]) by forward105p.mail.yandex.net (Yandex) with ESMTP id BE26C4085581; Thu, 14 Jun 2018 03:20:14 +0300 (MSK) Received: from smtp2p.mail.yandex.net (smtp2p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:7]) by mxback1o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id YF53QxkUHv-KE8KOeXE; Thu, 14 Jun 2018 03:20:14 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.com; s=mail; t=1528935614; bh=89dzl6rOA6LPlBBbY/6A0Pdmb2XLiqDfua/N+JtT6WA=; h=Subject:To:References:From:Message-ID:Date:In-Reply-To; b=BfTwXAraNpmuEg//aPB2syBiQ3jwW2DbzdW34J6e836T4C43JgUM5QCVJvUbadyg/ p3LHmxK0HDFj7o4w5CB7IMCZ40KPlmU0LO+/Iw6Zdpxb/JazeWkIz3Do73pj/o5jdi F2xfTnGT7mPiUhuB7tB8cexjRmUoZSd4+NCzXK+g= Received: by smtp2p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id UYKQlNNEU1-KCQqV9Vq; Thu, 14 Jun 2018 03:20:13 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.com; s=mail; t=1528935613; bh=89dzl6rOA6LPlBBbY/6A0Pdmb2XLiqDfua/N+JtT6WA=; h=Subject:To:References:From:Message-ID:Date:In-Reply-To; b=cepOfycH2ugjVKlSxfuA40IFQYGE+ud7IYzjlc5kzVpygCMZujR043wPVpjmUy88U xn4F3NMbaqdg+APj4GEctf8eog6f1G+N1HUhXi/PKfvFHCt58WI+kT28wc1oPb7N+W WtsM7IAnEtyQIjfdOsNI4BJfGVxcvg/63FZ/Cwkc= Authentication-Results: smtp2p.mail.yandex.net; dkim=pass header.i=@yandex.com Subject: Re: How to detect single user mode in FreeBSD ? To: JD , freebsd-questions@freebsd.org References: <20180613141217.a3ab7160a55398bf5ed56ef2@sohara.org> <5B21A915.3000209@gmail.com> From: Manish Jain Message-ID: <19ab9197-de34-e853-a66f-da413a56f16d@yandex.com> Date: Thu, 14 Jun 2018 05:48:43 +0530 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <5B21A915.3000209@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jun 2018 00:20:18 -0000 On 06/14/18 05:00, JD wrote: > > > On 06/13/2018 05:20 PM, blubee blubeeme wrote: >> On Wed, Jun 13, 2018, 22:49 Valeri Galtsev >> wrote: >> >>> >>> On 06/13/18 08:12, Steve O'Hara-Smith wrote: >>>> On Wed, 13 Jun 2018 18:04:08 +0530 >>>> Manish Jain wrote: >>>> >>>>> Tx for replying. But don't you think there should ideally be a >>>>> sysctl to >>>>> be detect the runlevel, particularly single user mode ? It makes >>>>> things >>>>        The runlevel concept comes from sysV init, it isn't a BSD >>>> thing at >>>> all. There isn't a real difference at all between single user and multi >>>> user. Single user mode is really just one of two states - before >>>> enabling >>>> ttys and running the rc scripts with start or after disabling the ttys >>> and >>>> running the rc.shutdown script. There's nothing special about it. >>>> >>>>        If you feel a need to test for single user then you should >>>> probably >>>> be testing for something else - such as whether a filesystem is mounted >>>> before running fsck on it which is what really matters and is >>>> completely >>>> independent of whether or not the system is running multi-user. >>>> >>> Thanks, Steve, for great explanation! >>> >>> Being Linux refugee myself I know the gang from inside: we fall into >>> wide spread of the spectrum, from learning hard (or re-learning and >>> expanding knowledge in case of those of us who had a journey from UNIX >>> to Linus and back) to actively demanding introduction into FreeBSD of >>> familiar things: Linuxisms. Explanations like yours always are >>> ultimately teach Linux refugees what FreeBSD is, and hopefully makes >>> them (us ;-) stop demanding introduction of Linuxisms into FreeBSD. >>> >> I can't agree with you more. FreeBSD isn't a Linux distribution. >> >> > To the original poster of this question: > Does the command > who -r > still work in FBSD? > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org" who -r returns error