{"id":605,"date":"2019-11-10T20:29:23","date_gmt":"2019-11-11T01:29:23","guid":{"rendered":"http:\/\/www.hpux.ws\/?p=605"},"modified":"2019-11-13T11:56:13","modified_gmt":"2019-11-13T16:56:13","slug":"the-yes-command","status":"publish","type":"post","link":"http:\/\/www.hpux.ws\/?p=605","title":{"rendered":"How to be a yes man"},"content":{"rendered":"\n<p>Learning something new is great. Joe Geiger taught me something cool that I should have learned years ago.<\/p>\n\n\n\n<p>Serviceguard users ever wanted to script a cluster change such as a node add. <\/p>\n\n\n\n<p>cmapplyconf -v -P &lt;package file&gt;<\/p>\n\n\n\n<p>Ends with a y\/n prompt do you want to apply? Normally that requires input. Not with the yes command:<\/p>\n\n\n\n<p>cmcheckconf -v -P &lt;package file&gt; <\/p>\n\n\n\n<p>rc=$?<\/p>\n\n\n\n<p># Check return code if not zero stop<\/p>\n\n\n\n<p>if [ ${rc} -ne 0 ]<\/p>\n\n\n\n<p>then<\/p>\n\n\n\n<p>  echo &#8220;Checkconf error ${rc}&#8221;<\/p>\n\n\n\n<p>exit ${rc}<\/p>\n\n\n\n<p>fi<\/p>\n\n\n\n<p>yes | cmapplyconf -v -P &lt;package file&gt; <\/p>\n\n\n\n<p># Check return code here as well<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learning something new is great. Joe Geiger taught me something cool that I should have learned years ago. Serviceguard users ever wanted to script a cluster change such as a node add. cmapplyconf -v -P &lt;package file&gt; Ends with a y\/n prompt do you want to apply? Normally that requires input. Not with the yes [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"_kadence_starter_templates_imported_post":false,"footnotes":""},"categories":[39,84],"tags":[194,18,48,13,193],"class_list":["post-605","post","type-post","status-publish","format-standard","hentry","category-scripting","category-serviceguard-2","tag-automation","tag-hp-ux","tag-scripting-2","tag-serviceguard","tag-yes-command"],"_links":{"self":[{"href":"http:\/\/www.hpux.ws\/index.php?rest_route=\/wp\/v2\/posts\/605"}],"collection":[{"href":"http:\/\/www.hpux.ws\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.hpux.ws\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.hpux.ws\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.hpux.ws\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=605"}],"version-history":[{"count":2,"href":"http:\/\/www.hpux.ws\/index.php?rest_route=\/wp\/v2\/posts\/605\/revisions"}],"predecessor-version":[{"id":611,"href":"http:\/\/www.hpux.ws\/index.php?rest_route=\/wp\/v2\/posts\/605\/revisions\/611"}],"wp:attachment":[{"href":"http:\/\/www.hpux.ws\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=605"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.hpux.ws\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=605"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.hpux.ws\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=605"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}