postremove question
- From: "Christopher L. Barnard" <cbar44@xxxxxxxxxxxx>
- Date: Fri, 26 Jan 2007 11:53:06 -0600 (CST)
I have a very quick pkg question.
I want to query the user after a pkg has been removed whether or not to
execute a certain command. I created a postremove file:
---------
echo ""
echo "foobar pkg removed. Remove it from the manifest? (y/[n]) \c"
read ans
if [ "x${ans}x" = "xyx" ]; then
echo "Now disabling foobar \c"
/usr/sbin/svcadm disable site/foobar
echo "and removing it."
/usr/sbin/svccfg delete -f site/foobar
else
echo "Nothing done. The service is still running, although the underlying"
echo "binary no longer exists."
fi
--------
The script runs after a pkgrm, but it does not wait for user input. How
do I get pkgrm to query the user for a y/n?
+-----------------------------------------------------------------------+
| Christopher L. Barnard O When I was a boy I was told that |
| cbarnard@xxxxxxxxxxxx / \ anybody could become president. |
| (312) 347-4901 O---O Now I'm beginning to believe it. |
| http://www.cs.uchicago.edu/~cbarnard --Clarence Darrow |
+----------PGP public key available via finger or PGP keyserver---------+
_______________________________________________
sunmanagers mailing list
sunmanagers@xxxxxxxxxxxxxxx
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
- Follow-Ups:
- SUMMARY: postremove question
- From: Christopher L. Barnard
- SUMMARY: postremove question
- Prev by Date: Sun Fire V40z Hardware mirroring
- Next by Date: Solaris 10 01/06 ignores /etc/shells
- Previous by thread: Sun Fire V40z Hardware mirroring
- Next by thread: SUMMARY: postremove question
- Index(es):
Relevant Pages
|