Gentoo Archives: gentoo-dev

From: Tres Melton <tres@××××××××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: user/group manipultaion feedback request.
Date: Mon, 31 Oct 2011 03:56:26
1 On Mon, 2005-10-03 at 12:04 +0200, Diego 'Flameeyes' Pettenò wrote:
2 > On Monday 03 October 2005 11:14, Duncan wrote:
4 Hello Duncan.
6 > Actually, bash is fine, as long as you declare #!/bin/bash the script. Every
7 > Gentoo/ALT system should have bash installed as part of base system, as bash
8 > is what the ebuilds are written in.
10 Good as this is what I was working from. I've coded the parts that
11 extract and parse the information from the /etc/{passwd,group} files
12 already as well as reading and writing the config files and not found it
13 necessary to make any head, tail, sed, grep, awk, wing and a prayer
14 calls. :) As I said, I want to write this in bash itself as much as
15 possible for portability.
17 > > Likewise, keep in mind POSIX compatibility when making any
18 > > sed/grep/file/etc calls. Don't assume the GNU versions. If you need the
19 > > info, I believe most of the manpages specify where the GNU versions
20 > > deviate from POSIX.
21 > Also here the point is not to avoid GNU calls on every tool, is just to make
22 > sure that the tool called is actually GNU :)
23 > The insidious GNUisms are the ones relative, for example, to cp or mv, which
24 > are base system commands. But GNUisms in sed calls are usually safe as long
25 > as you make sure that you're calling GNU sed. Ebuilds sanitize this aliasing
26 > it to gsed, while eselect uses aliases that checks the right tool to use.
27 >
28 > You can give a look to
29 > to have a
30 > list of common problems with GNUisms.
32 Thanks for the link. Once I start searching for processes to kill and
33 files to delete I'm sure that will become a good reference. I'm
34 thinking that these will be the only needed external programs:
36 find
37 ps
38 tar
39 gzip ? (or something else to compress things with)
41 I might write a test function to the install system to verify the
42 existence of the correct tools and switch to the correct syntax if I
43 need to. Although Gentoo is my primary goal I want things to work on a
44 minimal system of any flavor of *nix that has bash. That goal may have
45 to be abandoned though. We'll see.
47 Regards,
48 --
49 Tres Melton
50 IRC & Gentoo: RiverRat
53 --
54 gentoo-dev@g.o mailing list


Subject Author
Re: [gentoo-dev] Re: user/group manipultaion feedback request. "Diego 'Flameeyes' Pettenò" <flameeyes@g.o>