From owner-freebsd-rc@freebsd.org Tue Apr 19 02:12:45 2016 Return-Path: Delivered-To: freebsd-rc@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 97D61B12D3E for ; Tue, 19 Apr 2016 02:12:45 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 88A85169E for ; Tue, 19 Apr 2016 02:12:45 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u3J2Cjpl069237 for ; Tue, 19 Apr 2016 02:12:45 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-rc@FreeBSD.org Subject: [Bug 140440] [patch] allow local command files in rc.{suspend,resume} Date: Tue, 19 Apr 2016 02:12:45 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: conf X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: petr.fischer@me.com X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-rc@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Apr 2016 02:12:45 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D140440 Petr Fischer changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |petr.fischer@me.com --- Comment #2 from Petr Fischer --- +1 - nice to have - base rc scripts has "rc.local" and "rc.shutdown.local" - it's not very practical to edit system rc.resume and rc.suspend scripts IMHO --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-rc@freebsd.org Fri Apr 22 15:43:05 2016 Return-Path: Delivered-To: freebsd-rc@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3565B18834 for ; Fri, 22 Apr 2016 15:43:05 +0000 (UTC) (envelope-from kadecole@gmail.com) Received: from mail-ob0-x22d.google.com (mail-ob0-x22d.google.com [IPv6:2607:f8b0:4003:c01::22d]) (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 6D3421793 for ; Fri, 22 Apr 2016 15:43:05 +0000 (UTC) (envelope-from kadecole@gmail.com) Received: by mail-ob0-x22d.google.com with SMTP id tz8so50813464obc.0 for ; Fri, 22 Apr 2016 08:43:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to; bh=1Oda0A/zHUxCXI5VUldeEh89DyQe3y452zXqeRJQ7W8=; b=SV7XSUjSQr1OyuZ995+f4joXy540krQkwLQolRivECTmnGgW2oapHfGbY+kqFf/x4x u9rmpR4dUEwkFxokhjwav5lhyPXneSGqNzV4FmOIV/vMf7LuJGCIDfQKjEYuMshFQCLy NxVzuQvMrhNasna+trtSqcYTil27x/2YixVik6IRjkCKrfuX+CLW4cXHYsRdQFHmAfVw 2fZ73E6Atu8AdhuMGtnZJlhCrV6wstD7tkhC4iMYJCr9LxX3LIWtlGiCoev2kHBEUQOg gqkxgEJEX6f/tkAy5xYy6au8/LSqmszrmmx/+vvVvNGHEgRQrJ3Js+5fwvUcZK6xsRnz eD4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=1Oda0A/zHUxCXI5VUldeEh89DyQe3y452zXqeRJQ7W8=; b=WqyeYIAx3JS8HBYSEHS2i85pH+w0CKTolRCKuErClCm+9TPC+YgS0kYRIIAH3ndbsy izUopAEAkQIkjdH12jxtaaohQ5aXQIpJGkn7Aq+101LqWEkKEpA8elfsuSpk4ihCy9fM 6u7+lJ7PCHWDaKBXiAefMJP5bO4nrLnRXCUJ/aJsQ905cbzfTInZ3u50FLTejtIuDq1s 05WXMuC3DBzo+NJr7WSDKkJWq5Bny7G4jxtxQYIaTL5u6agdAewoNpxJ2Sr6KsUHgVRr Ggyhw5Zq/nq2k9/+Ye5LNWo1qXJWm/DBy/qjP1DSwfnubF3LZxHp9+m0KIlvSOroIRl3 38Vw== X-Gm-Message-State: AOPr4FWLuiLW3nRRlTPaQFJ9HzkfxeysvK67/Lye9KuC5bGzO0zakxdsWmZhGePyJXiYUXlWPFy0/qQphJ5RgA== MIME-Version: 1.0 X-Received: by 10.60.67.194 with SMTP id p2mr9444839oet.78.1461339784746; Fri, 22 Apr 2016 08:43:04 -0700 (PDT) Received: by 10.157.15.249 with HTTP; Fri, 22 Apr 2016 08:43:04 -0700 (PDT) Date: Fri, 22 Apr 2016 10:43:04 -0500 Message-ID: Subject: rc startup file questions From: Kade Cole To: freebsd-rc@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Apr 2016 15:43:05 -0000 I am working on a new rc file for starting rtty. I have it working for startup but it is not working for other arguments (status, stop). Part of the problem I am having is that when rtty starts it calls ttysrv for the devices you have configured in /usr/local/rtty/dev and starts a process of ttysrv for each file in /dev. rtty then also creates multiple pid files in /usr/local/rtty/pid for each service started. It seems that I can not figure out how to deal with these multiple pid files. If only one process of ttysrv is started then everything works. If more than one process is started I get the error "WARNING: no shebang line in" the second pid file. I was wondering if anyone has any suggestions on how to write a custom rtty_status or rtty_stop to deal with multiple pid files in a directory. Thanks for your help. Below is the current rc script I have been trying. #!/bin/sh # PROVIDE: rtty # REQUIRE: DAEMON usb # BEFORE: LOGIN # KEYWORD: shutdown . /etc/rc.subr name=rtty rcvar=rtty_enable command="/usr/local/rtty/bin/startsrv" procname="/usr/local/rtty/bin/ttysrv" pidfile="/usr/local/rtty/pid/*" start_cmd="${name}_start" rtty_start(){ echo "starting rtty." cd /usr/local/rtty/dev ${command} * } load_rc_config $name run_rc_command "$1"