source: freebsd-mgnt/port-list.sh@ 365

Last change on this file since 365 was 347, checked in by Rick van der Zwet, 13 years ago

Else it matches files like Muttrc.dist as well :-)

  • Property svn:executable set to *
File size: 620 bytes
RevLine 
[84]1#!/bin/sh
2# Small snippet of code used to detect which proceses
3#_really_ needs a re-start after upgrade
4#
5# Licence: BSDLike - http://rickvanderzwet.nl/LICENSE
6# Rick van der Zwet <info@rickvanderzwet.nl>
7
8TMPFILE=`basename $0 .sh`
9TMPFILE=`mktemp -t $TMPFILE`
10
11pkg_version -vIL= | awk '{print $1}' > $TMPFILE
12
13if [ ! -s $TMPFILE ]; then
14 exit 0
15fi
16
17SIZE=0
18NEWSIZE=1
19
20while [ $NEWSIZE -gt $SIZE ]; do
21 SIZE=`cat $TMPFILE | wc -l`
22 pkg_info -qR `cat $TMPFILE` >> $TMPFILE
23 sort -u -o $TMPFILE $TMPFILE
24 NEWSIZE=`cat $TMPFILE | wc -l`
25done
26
[347]27pkg_info -L `cat $TMPFILE` | grep -F '/rc.d/'
[84]28
29
30rm -f $TMPFILE
Note: See TracBrowser for help on using the repository browser.