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

Last change on this file since 343 was 217, checked in by Rick van der Zwet, 14 years ago

A real dot instead of any character

  • Property svn:executable set to *
File size: 618 bytes
Line 
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
27pkg_info -L `cat $TMPFILE` | grep -F 'rc.d'
28
29
30rm -f $TMPFILE
Note: See TracBrowser for help on using the repository browser.