From owner-freebsd-questions@freebsd.org Wed Jun 13 23:20:14 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 B71BE1022C42 for ; Wed, 13 Jun 2018 23:20:14 +0000 (UTC) (envelope-from gurenchan@gmail.com) Received: from mail-io0-x22a.google.com (mail-io0-x22a.google.com [IPv6:2607:f8b0:4001:c06::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C58281ACF for ; Wed, 13 Jun 2018 23:20:14 +0000 (UTC) (envelope-from gurenchan@gmail.com) Received: by mail-io0-x22a.google.com with SMTP id k3-v6so5271267iog.3 for ; Wed, 13 Jun 2018 16:20:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8nCtZ+l65Y0cG/wpvZLghtYdi9PtwfMyV7g4ieWPKe8=; b=JueBqmybgIIx+z6SyWH0fQvteuhYBA0os6GN964aXEEVWKkXv2/qbLggbm7hFeZq6k S2B0x4i7qZvipledJ7k2ttQYwcTPgYG47kvdwU4uD1vJM+AiG9LSglvNEL3ATy1y2+zE GY4/WQx+ZxqfOCP461ee7rBFYzD29s0TCBFEf6+GVHd6rfe9jln0u5SqXyTHWzdZ8u4Q +G8/hVOryd+EoapMZDuP6smy64lKc8WxE2vmBtjB4w4ionTcUN2wUWyVs1Pl3DEK5nmz V7vLQsJHbHQUlX0b/nxA87GPJHECiVVQtoCU/k0zHnhhPm2VMk7VBGdGeuI7Ex+kfin6 LiZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8nCtZ+l65Y0cG/wpvZLghtYdi9PtwfMyV7g4ieWPKe8=; b=udg7xLIa69Zl8onwcLvL4ptVS5Gxg2fd1nLT4ATNr31Mba5H5Nq0BoL7dxsePh2XoQ qdsZPR2OXGKBKjpEYgfXqYN50Hr1cRL2GHfw9kAPtmpjW5ZqeLBHwHOJxrmK5U9IvgUJ v9ZTwFvVCbK1c/yltJjFg4omM2q1mS1QSC+s7s0McejnPPUiD8IuSdMV5yexAKoYsBPh DepezE7DLnfALuDgNsFGUgtF3WyD1goOUYcBOR/lm6MDM6zMcQCwgEf9f38TbwdBJ+6o fDtfQBTedkK6WAir9Js/wbvjmbWuvrt5CWIK0AH/CNfN/5W9f2lCotu8jJPw8UOqoVoT GeOw== X-Gm-Message-State: APt69E2lW++W3m0CVHl2U1bfvoaA1jF4i2ggtmQ6H9fh6l94cDvA5n0B mZCvPSEtyly58+c3joLLKrUxj9CBilpmE/iiK3Y= X-Google-Smtp-Source: ADUXVKKf0PadQ5VRg+wVXxbLLCtXNWQWGc6P36BNXmeZMM5KHFeOXPlrLWn2GdXIUtnFxpzXbgv2IbnrB3c23cLlYxI= X-Received: by 2002:a6b:da15:: with SMTP id x21-v6mr177175iob.179.1528932013758; Wed, 13 Jun 2018 16:20:13 -0700 (PDT) MIME-Version: 1.0 References: <20180613141217.a3ab7160a55398bf5ed56ef2@sohara.org> In-Reply-To: From: blubee blubeeme Date: Thu, 14 Jun 2018 07:20:17 +0800 Message-ID: Subject: Re: How to detect single user mode in FreeBSD ? To: Valeri Galtsev Cc: freebsd-questions@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 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: Wed, 13 Jun 2018 23:20:15 -0000 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. > > Valeri > -- > ++++++++++++++++++++++++++++++++++++++++ > Valeri Galtsev > Sr System Administrator > Department of Astronomy and Astrophysics > Kavli Institute for Cosmological Physics > University of Chicago > Phone: 773-702-4247 > ++++++++++++++++++++++++++++++++++++++++ > _______________________________________________ > 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" >