info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(no subject)


From: root
Subject: (no subject)
Date: Mon, 13 Aug 2001 05:11:47 -0400

>From address@hidden  Fri Feb  9 05:44:52 2001
>Return-Path: <address@hidden>
Received: from fencepost.gnu.org (address@hidden [199.232.76.164])
        by gateway.camelot.jp (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id 
FAA18308
        for <address@hidden>; Fri, 9 Feb 2001 05:44:47 +0900
Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org)
        by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
        id 14QxnU-0006e0-00; Thu, 08 Feb 2001 15:36:08 -0500
Received: from telepres.com ([209.226.75.17] helo=mail.telepres.com)
        by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
        id 14Qxmn-0006d4-00
        for <address@hidden>; Thu, 08 Feb 2001 15:35:25 -0500
Received: from localhost 
        by mail.telepres.com (Smail-3.2.0.111 2000-Feb-17 #1; 2000-Feb-24)
        (2413 bytes) via sendmail with 
/P:stdio/R:bind_hosts/T:inet_zone_bind_smtp
        id <address@hidden>
        (sender <address@hidden>)
        for address@hidden; Thu, 8 Feb 2001 15:35:24 -0500 (EST)
From: Eric Siegerman <address@hidden>
To: address@hidden
Subject: Re: Force CVS to using root to commit files (one way or another)
Message-ID: <address@hidden>
Mail-Followup-To: address@hidden
References: <address@hidden> <address@hidden>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <address@hidden>; from address@hidden on Thu, Feb 08, 2001 at 
09:57:57AM -0500
Organization: Telepresence Systems Inc.
Sender: address@hidden
Errors-To: address@hidden
X-BeenThere: address@hidden
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:address@hidden>
List-Post: <mailto:address@hidden>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/info-cvs>,
        <mailto:address@hidden>
List-Id: Announcements and discussions for the CVS version control system 
<info-cvs.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/info-cvs>,
        <mailto:address@hidden>
List-Archive: <http://mail.gnu.org/pipermail/info-cvs/>
Date: Thu, 8 Feb 2001 15:35:24 -0500
Status: O
Content-Length: 1850
Lines: 61

On Thu, Feb 08, 2001 at 09:57:57AM -0500, Todd Denniston wrote:
> Matthew J Fletcher wrote:
> > - Due to the requirements of our work we need to be operating as root, (this
> > is set in stone, honist),
> 
> [...] the only time you NEED to be root is to "make
> install [...]", assuming you know how to use file
> permissions. 

Technically true.  They may have some broken development process
mandated by some pointy-haired boss, though.  Beyond the scope of
this list...

> 
> > eg,.
> > 
> > #!/bin/bash
> > su matt
> > tkcvs -dir /usr/src/cvssources &
> > exit
> > 
> > but it dont work,.. any ideas ?

No, it wouldn't.  The "su" command starts up a shell that reads
from standard input, which is your terminal, not the script.
When you quit that shell, the script continues (with the "tkcvs"
command) in the old context, ie. as root.

> > 
> Try this:
> 
> #!/bin/bash
> su - matt -c "tkcvs -dir /usr/src/cvssources" 
> exit

Not all variants of "su" take a -c option; depends which flavour
of Unix you're using.  If yours doesn't, try this version, which
supplies the command you want to run as standard input to the
"su" command, and thus to the subshell that it spawns:

        #!/bin/bash
        echo "tkcvs -dir /usr/src/cvssources; exit" | su matt

(You almost certainly don't need the "; exit", since the subshell
should exit on its own when it sees end-of-file.  I added it for
completeness, in case bash has been told to ignore end-of-file.)

--

|  | /\
|-_|/  >   Eric Siegerman, Toronto, Ont.        address@hidden
|  |  /
Interviewer: You've been looking at the stars all your life:
Is there anything in astrology?
Arthur C. Clarke: It's utter nonsense.  But I'm a Sagittarius,
so I'm naturally skeptical.

_______________________________________________
Info-cvs mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/info-cvs




reply via email to

[Prev in Thread] Current Thread [Next in Thread]