From patchwork Sat Dec 17 11:00:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Pocock X-Patchwork-Id: 9478957 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D5E9560237 for ; Sat, 17 Dec 2016 11:00:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D58862858A for ; Sat, 17 Dec 2016 11:00:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C8AF5285A3; Sat, 17 Dec 2016 11:00:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_TVD_MIME_EPI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E25432858A for ; Sat, 17 Dec 2016 11:00:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753928AbcLQLAx (ORCPT ); Sat, 17 Dec 2016 06:00:53 -0500 Received: from mail1.trendhosting.net ([195.8.117.5]:50920 "EHLO mail1.trendhosting.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752729AbcLQLAx (ORCPT ); Sat, 17 Dec 2016 06:00:53 -0500 Received: from localhost (localhost [127.0.0.1]) by mail1.trendhosting.net (Postfix) with ESMTP id 897A7150C7 for ; Sat, 17 Dec 2016 11:00:49 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=pocock.pro; s=mail; t=1481972449; bh=nAYqG5ikFMhRSwwIBLFjHMkG0keFazC8nPMDHueyLrw=; h=To:From:Subject:Date:From; b=Dpj2qPBZYt++zwf3JUhHZYj/jw6UGa0SRBWeV5doUwOIKl347u1a3oTVlNr28YKIs ed2w8uw3NAyV63RYA/N7JJQod+nSZ1eKNgzQWxvMWlCW4nIHKWViNtSQnoCojfzJ5c Jj5IlfC2jMbV8h8vVwEn6qTzp0th6aofCnXo1vXQ= Received: from mail1.trendhosting.net ([127.0.0.1]) by localhost (thp003.trendhosting.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id guU1GhL5bHa0 for ; Sat, 17 Dec 2016 11:00:47 +0000 (GMT) To: linux-nfs@vger.kernel.org From: Daniel Pocock Subject: [PATCH] nfs-utils: start-statd script using incompatible file descriptor X-Enigmail-Draft-Status: N1110 Message-ID: <70eeb75e-e48f-fb0a-a690-1c6c8cb0ede4@pocock.pro> Date: Sat, 17 Dec 2016 12:00:47 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.2.0 MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The current script uses fd 200, doesn't work for every possible shell as reported[1] in Debian bug #848277 We are including a patch for it in the 1.3.4-2 package, it would be good to incorporate this patch upstream too. Regards, Daniel 1. https://bugs.debian.org/848277 diff --git a/utils/statd/start-statd b/utils/statd/start-statd index 2fd6039..82715b4 100755 --- a/utils/statd/start-statd +++ b/utils/statd/start-statd @@ -7,8 +7,8 @@ PATH="/sbin:/usr/sbin:/bin:/usr/bin" # Use flock to serialize the running of this script -exec 200> /var/run/rpc.statd.lock -flock -e 200 +exec 9> /var/run/rpc.statd.lock +flock -e 9 if [ -s /var/run/rpc.statd.pid ] && [ 1`cat /var/run/rpc.statd.pid` -gt 1 ] &&