1 |
On Monday 03 October 2005 13:39, Tres Melton wrote: |
2 |
> I've coded the parts that |
3 |
> extract and parse the information from the /etc/{passwd,group} files |
4 |
I think with this you're already out of portability. /etc/passwd structure in |
5 |
Linux and FreeBSD is different, and on Darwin the users part is completely |
6 |
another story. Take a look to enewuser/enewgroup functions on eutils eclass. |
7 |
|
8 |
> find |
9 |
This is mostly compatible a part a couple of commands (like -printf) and the |
10 |
fact that it *needs* that you give him a path to work on. |
11 |
|
12 |
> ps |
13 |
This is different from OS to OS, the Linux version is not portable. Have a |
14 |
look to pgrep, but that's not completely portable, too. |
15 |
|
16 |
> tar |
17 |
As long as you use the basic commands, it should be safe. You cannot ignore |
18 |
the format of the archive, tho, as just bsdtar and later GNU tars support |
19 |
that. |
20 |
|
21 |
> gzip ? (or something else to compress things with) |
22 |
That's just the same. |
23 |
|
24 |
> Although Gentoo is my primary goal I want things to work on a |
25 |
> minimal system of any flavor of *nix that has bash. |
26 |
You'll probably have not to use directly the /etc/{passwd,group} files, as |
27 |
they are not universal. Every os uses its own ways to access those data, and |
28 |
things do not get better when adding pam as a variable in all this. |
29 |
|
30 |
Take a look to egetent, egethome functions in eutils and portability eclass if |
31 |
you want to take a look to what is done now. That is still incomplete, |
32 |
though, so you will probably have other things to arrange... |
33 |
|
34 |
You're wellcome to join gentoo-alt mailing list to discuss of portability in |
35 |
case :) |
36 |
|
37 |
-- |
38 |
Diego "Flameeyes" Pettenò - http://dev.gentoo.org/~flameeyes/ |
39 |
Gentoo/ALT lead, Gentoo/FreeBSD, Video, AMD64, Sound, PAM, KDE |
40 |
|
41 |
-- |
42 |
gentoo-dev@g.o mailing list |