Newsgroups: fj.sys.sun
Path: galaxy.trc.rwcp.or.jp!coconuts.jaist!wnoc-tyo-news!spinnews!spinosk!aries.ogis-ri.co.jp!senri-nc!odins-suita!aist-nara!wnoc-kyo-news!rinsgw!nakano
From: nakano@math.ryukoku.ac.jp (Hiroshi NAKANO)
Subject: Re: /usr/bin/calendar for NIS+
In-Reply-To: kazama@mm.ntt-fanet.co.jp's message of 27 Sep 1995 00:03:04 GMT
Message-ID: <NAKANO.95Sep29121041@dolphin70.math.ryukoku.ac.jp>
Sender: news@rins.ryukoku.ac.jp
Nntp-Posting-Host: dolphin70.math.ryukoku.ac.jp
Reply-To: nakano@rins.ryukoku.ac.jp
Organization: Ryukoku Univ., Seta, Otsu, Japan
References: <KAZAMA.95Sep27090304@altair.mm.ntt-fanet.co.jp>
Date: Fri, 29 Sep 1995 03:10:41 GMT
Lines: 46
Xref: galaxy.trc.rwcp.or.jp fj.sys.sun:6409
X-originally-archived-at: http://galaxy.rwcp.or.jp/text/cgi-bin/newsarticle2?ng=fj.sys.sun&nb=6409&hd=a
X-reformat-date: Mon, 18 Oct 2004 15:18:22 +0900
X-reformat-comment: Tabs were expanded into 4 column tabstops by the Galaxy's archiver. See http://katsu.watanabe.name/ancientfj/galaxy-format.html for more info.

In article <KAZAMA.95Sep27090304@altair.mm.ntt-fanet.co.jp>
kazama@mm.ntt-fanet.co.jp (Kazuhiro Kazama) writes:
 |$B!!(B/usr/bin/calendar$B$O(Bshell script$B$J$s$G$9$,!"FbIt$G(B/etc/passwd$B$H(Bypcat
 |$B$O;H$C$F$$$k$N$G$9$,!"(BNIS+$B$N(Bniscat$B$r;H$C$F%f!<%6$rF@$F$$$J$$$N$G$9!#(B

$B%[!<%`%G%#%l%/%H%j$,$I$3$K$"$k$+$r5$$K$7$J$$$N$J$i$P!"0J2<$N$h$&$K(B
getent $B$r;H$&$N$O$I$&$G$7$g$&!#(B $B<+$:$+$i(B nsswitch.conf $B$N@_Dj$rH?1G$9(B
$B$kH&$G$9!#(B

*** /usr/bin/calendarSat Jul 16 12:38:40 1994
--- calendarFri Sep 29 11:53:08 1995
***************
*** 10,20 ****
  #calendar.sh - calendar command, uses /usr/lib/calprog
  
  PATH=/usr/bin
- if (rpcinfo -p | fgrep -s ypbind); then
- caldata="ypcat passwd.byname | grep /`uname -n`/"
- else
- caldata="cat /dev/null"
- fi
  _tmp=/tmp/cal$$
  trap "rm -f ${_tmp} /tmp/calendar.$$; trap '' 0; exit" 0 1 2 13 15
  /usr/lib/calprog > ${_tmp}
--- 10,15 ----
***************
*** 24,30 ****
  else
  echo $0: `pwd`/calendar not found
  fi;;
! *)eval $caldata | cat /etc/passwd - | \
  sed 's/\([^:]*\):.*:\(.*\):[^:]*$/_dir=\2 _user=\1/' | \
  while read _token; do
  eval ${_token}# evaluates _dir= and _user=
--- 19,25 ----
  else
  echo $0: `pwd`/calendar not found
  fi;;
! *)getent passwd | \
  sed 's/\([^:]*\):.*:\(.*\):[^:]*$/_dir=\2 _user=\1/' | \
  while read _token; do
  eval ${_token}# evaluates _dir= and _user=

--
Hiroshi Nakano <nakano@rins.ryukoku.ac.jp>
Ryukoku Univ., Seta, Otsu, Japan
