This is the mail archive of the
cygwin-apps@cygwin.com
mailing list for the Cygwin project.
RE: /etc/profile, mk[passwd|group|group_l_d] messages
- From: "Morrison, John" <John dot Morrison at uk dot experian dot com>
- To: "'Pierre dot Humblet at ieee dot org'" <Pierre dot Humblet at ieee dot org>
- Cc: cygwin-apps at cygwin dot com
- Date: Thu, 28 Aug 2003 15:19:59 +0100
- Subject: RE: /etc/profile, mk[passwd|group|group_l_d] messages
Pierre A. Humblet wrote:
> John,
>
> I like having 3 separate messages.
> Perhaps you could add an introduction such as
> echo "Your group is currently \"mkpasswd\". This indicates
> that .."
Good idea :)
> The first two cases should never occur, except in rare cases of
> postinstall screw up or if the files get deleted somehow.
>
> The last case is the norm for domain users.
> It is correct that the message can be safely ignored.
> Just a thought: you could consider displaying it only once,
> e.g. by sed'ing /etc/group to change mkgroup_l_d to mkgroup-l-d.
> Neither /etc/passwd nor /etc/group are complete (because the
> primary domain controller is not contacted during postinstall).
> So the message should advise but not mandate to rebuild both.
> echo "The /etc/passwd and /etc/group files should be completed." echo
> "See the man pages ..
>
>
> Pierre
Hows this...? (edit inline)
case "`id -ng`" in
mkpasswd )
echo "Your group is currently \"`id -ng`\". This indicates that
echo "the /etc/passwd (and possibly /etc/group) files should be rebuilt."
echo "See the man pages for mkpasswd and mkgroup then, for example, run"
echo "mkpasswd -l [-d] > /etc/passwd"
echo "mkgroup -l [-d] > /etc/group"
echo "as appropriate. Note that the -d switch is necessary for"
echo "domain users."
;;
mkgroup )
echo "The /etc/group (and possibly /etc/passwd) files need to be rebuilt."
echo "See the man pages for mkpasswd and mkgroup then, for example, run"
echo "mkpasswd -l [-d] > /etc/passwd"
echo "mkgroup -l [-d] > /etc/group"
echo "as appropriate. Note that the -d switch is necessary for"
echo "domain users."
;;
mkgroup_l_d )
echo "The /etc/group file doesn't contain the domain groups."
echo "See the man page for mkgroup and then, for example, run"
echo "mkgroup -l -d > /etc/group"
echo "as appropriate."
echo
echo "You can safely ignore this message"
# only display the above once
cat /etc/group | sed -e 's/mkgroup_l_d/mkgroup-l-d/g' > /etc/group.new
mv /etc/group /etc/group.mkgroup_l_d
mv /etc/group.new /etc/group
;;
esac
J.
==========================================================================
Information in this email and any attachments are confidential, and may
not be copied or used by anyone other than the addressee, nor disclosed
to any third party without our permission. There is no intention to
create any legally binding contract or other binding commitment through
the use of this electronic communication unless it is issued in accordance
with the Experian Limited standard terms and conditions of purchase or
other express written agreement between Experian Limited and the recipient
Experian Limited (registration number 653331)
Registered office: Talbot House, Talbot Street, Nottingham NG1 5HF