public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Tres Melton <tres@mindspring.com>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev]  Re: user/group manipultaion feedback request.
Date: Mon, 03 Oct 2005 05:39:05 -0600	[thread overview]
Message-ID: <1128339545.6208.390.camel@thor.tres.org> (raw)
In-Reply-To: <200510031204.58995@enterprise.flameeyes.is-a-geek.org>

On Mon, 2005-10-03 at 12:04 +0200, Diego 'Flameeyes' Pettenò wrote:
> On Monday 03 October 2005 11:14, Duncan wrote:

Hello Duncan.

> Actually, bash is fine, as long as you declare #!/bin/bash the script. Every 
> Gentoo/ALT system should have bash installed as part of base system, as bash 
> is what the ebuilds are written in. 

Good as this is what I was working from.  I've coded the parts that
extract and parse the information from the /etc/{passwd,group} files
already as well as reading and writing the config files and not found it
necessary to make any head, tail, sed, grep, awk, wing and a prayer
calls.  :)    As I said, I want to write this in bash itself as much as
possible for portability.

> > Likewise, keep in mind POSIX compatibility when making any
> > sed/grep/file/etc calls.  Don't assume the GNU versions.  If you need the
> > info, I believe most of the manpages specify where the GNU versions
> > deviate from POSIX. 
> Also here the point is not to avoid GNU calls on every tool, is just to make 
> sure that the tool called is actually GNU :)
> The insidious GNUisms are the ones relative, for example, to cp or mv, which 
> are base system commands. But GNUisms in sed calls are usually safe as long 
> as you make sure that you're calling GNU sed. Ebuilds sanitize this aliasing 
> it to gsed, while eselect uses aliases that checks the right tool to use.
> 
> You can give a look to 
> http://www.gentoo.org/proj/en/gentoo-alt/maintnotes.xml#doc_chap2 to have a 
> list of common problems with GNUisms.

Thanks for the link.  Once I start searching for processes to kill and
files to delete I'm sure that will become a good reference.  I'm
thinking that these will be the only needed external programs:

find
ps
tar
gzip ? (or something else to compress things with)

I might write a test function to the install system to verify the
existence of the correct tools and switch to the correct syntax if I
need to.  Although Gentoo is my primary goal I want things to work on a
minimal system of any flavor of *nix that has bash.  That goal may have
to be abandoned though.  We'll see.

Regards,
-- 
Tres Melton
IRC & Gentoo: RiverRat


-- 
gentoo-dev@gentoo.org mailing list



  parent reply	other threads:[~2011-10-31  3:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-03  6:49 [gentoo-dev] user/group manipultaion feedback request Tres Melton
2005-10-03  9:14 ` [gentoo-dev] " Duncan
     [not found]   ` <200510031204.58995@enterprise.flameeyes.is-a-geek.org>
2005-10-03 11:39     ` Tres Melton [this message]
2005-10-03 12:00       ` Diego 'Flameeyes' Pettenò

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1128339545.6208.390.camel@thor.tres.org \
    --to=tres@mindspring.com \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox