Hi Christine, >>Here's a list of Q&As I've been putting together, cobbled from my notes, >>questions on smf-discuss and the blogs.
Well done! Even I learned something ;-) @Liane, @Kathy: I'm not sure if you're involved already but I think this Q&A is a good start for an "official" Q&A. >>Please direct any correction >>to smf-discuss and I'll make sure to fix what needs fixing. see below regards Bernd Some thoughts >>1.1 Short listing of SMF files and directories: IMHO the list should be more detailed about the sub directories and files in the svc directories. >>1.3 Short listing of relevant SMF man pages: inetconv, inetd, svc.configd, smf_restarter, and servic_bundle are missing >>2.1 How can I allow user X to control service Y? A hint that the information in the repository is readable by all users would be useful. >>2.4 How do I back up the repository? >> You can make copies of /etc/svc/repository.db but there is a risk >> that such a copy won't be self-consistent if svc.configd makes a >> change during the copy. You could use pstop on svc.configd before makeing the copy (see http://www.opensolaris.org/jive/thread.jspa?messageID=38593雁) and use sqlite to check the integrity of the copied repository: # from /lib/svc/bin/restore_repository # REPOSITORY="/var/tmp/myrepository.db" if [ $( echo PRAGMA integrity_check \; | /lib/svc/bin/sqlite ${REPOSITORY} ) = "^ok$" ] ; then echo "The repository is okay" else echo "Looks like the repository is not okay" fi >>3.12 Why is network/physical hanging? A work around or RFE is missing >>4.1 How do I write an SMF manifest? Add additional infos about which manifest to use as example: You can use * system/utmp for a simple standalone daemon * system/coreadm for simple configuration service (e.g. the service runs only once at system start) * network/telnet for an inetd-managed service * network/http:apache2 for an service with dependencies Also a hint to /lib/svc/share/smf_includes.sh (including a short description of the function, variables and return codes defined in that file) would be useful Missing infos - a quick summary about the differences between the refresh method, the start and stop methods, and the restart method (e.g. do not stop/start the application in the refresh method) - AFAIK :true is the default method for all not existing methods That may lead to confusion if you do a svcadm refresh for a service for which no refresh method is defined. - a special entry that explains that methods are called asynchronously (-> you need to check the result of a svcadm call to be sure) Maybe including infos about the handling of svcadm from inside a method. - the shell for legacy scripts maybe different in Solaris 10: "The latter. If the script's name does not end with .sh, then /etc/rc? launches it with a plain lsvcrun invocation (no -s), which exec()s "/bin/sh -c <script>", which I believe should respect the interpreter of the script." - default environment & PATH for methods - keywords for methods (e.g. :kill, :true) - how to list the processes monitored by a service (svcs -p ) - infos about services & contracts - properties for inetd managed services including the default properties - an entry about the TCP wrapper configuration (how to enable, view, disable). IMHO this is the most important property of inetd managed services - infos about when to use intedadm or svcadm and what action can and can not be done with inetadm and/or svcadm - an entry about dependency cylces and that there is no method to check for a dependency cycle without doing a svcadm refresh or reboot the machine - an entry about profiles (how to create; apply, etc) - how to change the current milestone (e.g. how to leave "single user mode") - I'm no friend of GUIs but a list of existing GUIs for svc should be added to the FAQ - I like the discussion entry from Liane about using the console in a service (Interrupting boot process) - but I'm not sure if it should be in the official FAQ. - A section with links to more indepth information would be useful. -- Bernd Schemmer, Frankfurt am Main, Germany http://home.arcor.de/bnsmb/index.html M?s temprano que tarde el mundio cambiar? Fidel Castro