From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 553DF13888F for ; Wed, 7 Oct 2015 16:40:07 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C4B41E07EA; Wed, 7 Oct 2015 16:40:05 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6A8FAE07EA for ; Wed, 7 Oct 2015 16:40:05 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 223A1340566 for ; Wed, 7 Oct 2015 16:40:03 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BC936279 for ; Wed, 7 Oct 2015 16:39:56 +0000 (UTC) From: "William Hubbs" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "William Hubbs" Message-ID: <1444235731.6fa0d6318bcd5c98548cff2ff840bca116892ca5.williamh@OpenRC> Subject: [gentoo-commits] proj/openrc:master commit in: init.d/ X-VCS-Repository: proj/openrc X-VCS-Files: init.d/mtab.in X-VCS-Directories: init.d/ X-VCS-Committer: williamh X-VCS-Committer-Name: William Hubbs X-VCS-Revision: 6fa0d6318bcd5c98548cff2ff840bca116892ca5 X-VCS-Branch: master Date: Wed, 7 Oct 2015 16:39:56 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 9cf93ac9-4809-400c-becd-04d562fef15c X-Archives-Hash: 6a4ef2d3e30fe1aeac908c0c2ef0c0bd commit: 6fa0d6318bcd5c98548cff2ff840bca116892ca5 Author: William Hubbs gmail com> AuthorDate: Wed Oct 7 16:35:31 2015 +0000 Commit: William Hubbs gentoo org> CommitDate: Wed Oct 7 16:35:31 2015 +0000 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=6fa0d631 mtab: fix update logic This advises users to remove mtab from their runlevels if /etc/mtab is a symlink, and it creates the symlink if /etc/mtab does not exist on a system. X-Gentoo-Bug: 560060 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=560060 init.d/mtab.in | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/init.d/mtab.in b/init.d/mtab.in index 51575b4..1442ffd 100644 --- a/init.d/mtab.in +++ b/init.d/mtab.in @@ -12,21 +12,18 @@ depend() start() { - [ -L /etc/mtab ] && return 0 local rc=0 ebegin "Updating /etc/mtab" - if ! checkpath -W /etc; then + if [ -L /etc/mtab ] ; then + ewarn "/etc/mtab is a symlink, not updating." + ewarn "FYI - You can safely remove mtab from your runlevels." + elif ! checkpath -W /etc; then rc=1 elif [ ! -e /etc/mtab ]; then + einfo "Creating mtab symlink" ln -snf /proc/self/mounts /etc/mtab else - ewarn "The support for updating /etc/mtab as a file is" - ewarn "deprecated and will be removed in the future." - ewarn "Please run the following command as root on your system." - ewarn - ewarn "ln -snf /proc/self/mounts /etc/mtab" - ewarn - + einfo "Updating mtab file" # With / as tmpfs we cannot umount -at tmpfs in localmount as that # makes / readonly and dismounts all tmpfs even if in use which is # not good. Luckily, umount uses /etc/mtab instead of /proc/mounts