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

Last change on this file since 138 was 84, checked in by Rick van der Zwet, 15 years ago

Administering BSD machines the easy way

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