diff options
author | Jerry Jelinek <jerry.jelinek@joyent.com> | 2017-02-07 12:19:57 +0000 |
---|---|---|
committer | Jerry Jelinek <jerry.jelinek@joyent.com> | 2017-02-07 12:19:57 +0000 |
commit | fee98a3b8f015b17a4769a5be463eb01425da23a (patch) | |
tree | b731047fc1efc3f1b05dc4e466a542f6cfec1541 | |
parent | d03efe1ba0e33c3e83d41bf66c9fd4703bea79f6 (diff) | |
parent | 56bce6093e5a50ce1da04e68f5e22a53c35cc8a8 (diff) | |
download | illumos-joyent-fee98a3b8f015b17a4769a5be463eb01425da23a.tar.gz |
[illumos-gate merge]
commit 56bce6093e5a50ce1da04e68f5e22a53c35cc8a8
7818 SMF does not always cleanup services that have been removed
-rw-r--r-- | usr/src/cmd/svc/milestone/manifest-import | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/usr/src/cmd/svc/milestone/manifest-import b/usr/src/cmd/svc/milestone/manifest-import index a9bf71ce7e..81cd780583 100644 --- a/usr/src/cmd/svc/milestone/manifest-import +++ b/usr/src/cmd/svc/milestone/manifest-import @@ -20,6 +20,7 @@ # CDDL HEADER END # # Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2017 RackTop Systems. # # 0a Initialization. @@ -73,17 +74,13 @@ function svccfg_apply { } # -# If the smf/manifest table has file entries that are missing +# If the smf repository has file entries that are missing # then there is work to be done by the cleanup process. # function cleanup_needwork { - if [ "$early" == true ]; then - smfmfiles=`/usr/bin/svcprop smf/manifest | \ - awk '(/^lib_/ && /\/manifestfile /) {print $3}'` - else - smfmfiles=`/usr/bin/svcprop smf/manifest | \ - awk '/\/manifestfile / {print $3}'` - fi + smfmfiles=`svcprop -p manifestfiles '*' 2>/dev/null | + nawk -v early="$early" '$2 == "astring" && + (early != "true" || $3 ~ "^/lib/") { print $3 }'` nw=`/lib/svc/bin/mfstscan $smfmfiles 2>&1 1>/dev/null` [ "$nw" ] && return 1 |