From patchwork Wed Jun 3 19:26:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bastian Bittorf X-Patchwork-Id: 480087 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id A6F681401B5 for ; Thu, 4 Jun 2015 05:17:50 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=bluebottle.com header.i=@bluebottle.com header.b=N7ipMVx6; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 364AF28094C; Wed, 3 Jun 2015 21:16:00 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 0BD1B28094C for ; Wed, 3 Jun 2015 21:15:50 +0200 (CEST) X-policyd-weight: using cached result; rate: -8.5 Received: from fe0.bluebottle.com (mail.bluebottle.com [176.9.67.91]) by arrakis.dune.hu (Postfix) with ESMTP for ; Wed, 3 Jun 2015 21:15:48 +0200 (CEST) Received: from localhost (p57AB0FA7.dip0.t-ipconnect.de [87.171.15.167]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: bittorf@bluebottle.com) by fe0.bluebottle.com (Postfix) with ESMTPSA id 435C91A56E for ; Wed, 3 Jun 2015 19:17:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=bluebottle.com; s=fe0; t=1433359042; bh=OxvsdJSwqGSOrfQTK6Mz0LKppKO++OqWyB26D+7PMMA=; l=1140; h=Date:From:To:Subject:From; b=N7ipMVx68tfCDm7O8XsaGDjTFaQP0bSdX/SNKsWGHRf3/Uu59FQ+NdqAbMmbblUtH hbpfBr1Rtw9K1zqjNLNAcOMgiNGWx43n/45M2RhHyZ5WpOhzBMpznOhsEDUuE1U/vz zBtqxFN79z0eWrhTlTnkagkXKMQ+HhFiAXl0p1v4= Date: Wed, 3 Jun 2015 21:26:27 +0200 From: Bastian Bittorf To: openwrt-devel@lists.openwrt.org Message-ID: <20150603192627.GA17345@medion.lan> Mail-Followup-To: openwrt-devel@lists.openwrt.org MIME-Version: 1.0 Content-Disposition: inline X-Editor: vi http://ex-vi.sourceforge.net/ User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: clamav-milter 0.98.6 at fe0 X-Virus-Status: Clean Subject: [OpenWrt-Devel] [PATCH] [base-files] show hint when JFFS2-partition is full and overlayfs mounted read-only X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" since r45833 and r45848 the overlayfs is automatically mounted read-only (and blocks remounts as r/w) when JFFS2 is full. see ticket #19564 because of this normal file deletion is not possible anymore. if a user logins interactively (e.g. SSH) show a hint for this, that files must be removed in /overlay/upper/... Signed-off-by: Bastian Bittorf --- package/base-files/files/etc/profile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package/base-files/files/etc/profile b/package/base-files/files/etc/profile index 3dd58e1..007baf0 100644 --- a/package/base-files/files/etc/profile +++ b/package/base-files/files/etc/profile @@ -1,6 +1,10 @@ #!/bin/sh [ -f /etc/banner ] && cat /etc/banner [ -e /tmp/.failsafe ] && cat /etc/banner.failsafe +fgrep -sq '/ overlay ro,' /proc/mounts && { + echo 'Your JFFS2-partition seems full and overlayfs is mounted read-only.' + echo 'Please try to remove files from /overlay/upper/... and reboot!' +} export PATH=/usr/bin:/usr/sbin:/bin:/sbin export HOME=$(grep -e "^${USER:-root}:" /etc/passwd | cut -d ":" -f 6)