
{"id":36,"date":"2014-03-27T21:44:49","date_gmt":"2014-03-27T10:44:49","guid":{"rendered":"http:\/\/mnm.at\/markus\/?p=36"},"modified":"2014-04-05T12:00:38","modified_gmt":"2014-04-05T01:00:38","slug":"using-packer-to-build-the-opensuse-123-update-part-3","status":"publish","type":"post","link":"https:\/\/mnm.at\/markus\/2014\/03\/27\/using-packer-to-build-the-opensuse-123-update-part-3\/","title":{"rendered":"Using packer to build the opensuse 12.3 update part #3"},"content":{"rendered":"<h3><a href=\"https:\/\/bugzilla.novell.com\/show_bug.cgi?id=821879\">SuSE bug 821879 \u2013 udev update breaks network:<\/a><\/h3>\n<p>My work for the problem with udev breaking the network is <a href=\"https:\/\/bitbucket.org\/markus_ebenhoeh\/packer-opensuse.12.3\/raw\/60042bffccaff3412f3539a8038b966400b0b140\/scripts\/install_suse_updates.sh\">this script<\/a> :<\/p>\n<pre><code>    #!\/bin\/bash\n\n    t=\/tmp\/update-script\n    #$( mktemp )\n\n    cat &gt;${t} &lt;&lt;ENDL\n    zypper --non-interactive modifyrepo --disable --no-refresh openSUSE-12.3-1.7\n    zypper --non-interactive addrepo --check --refresh --name \"Update Repository (Non-Oss)\" http:\/\/download.opensuse.org\/update\/12.3-non-oss\/ download.opensuse.org-12.3-non-oss\n    zypper --non-interactive addrepo --check --refresh --name \"Main Repository (NON-OSS)\" http:\/\/download.opensuse.org\/distribution\/12.3\/repo\/non-oss\/ download.opensuse.org-non-oss   \n    zypper --non-interactive addrepo --check --refresh --name \"Main Repository (OSS)\" http:\/\/download.opensuse.org\/distribution\/12.3\/repo\/oss\/ download.opensuse.org-oss     \n    zypper --non-interactive addrepo --check --refresh --name \"Main Update Repository\" http:\/\/download.opensuse.org\/update\/12.3\/ download.opensuse.org-update \n    zypper --non-interactive refresh\n    zypper --non-interactive update\n    sleep 10 \n    reboot\n    # to make sure we wait for the reboot \n    sleep 10 \n\n    ENDL\n\n    chmod u+x ${t}\n\n    echo storing output under VM : ${t}.out\n    nohup bash -vx ${t} &gt; ${t}.out &amp;\n<\/code><\/pre>\n<p>for packer I also added this:<\/p>\n<pre><code>    echo Initiating sshd shutdown and killing all ssh* processes.\n    echo The install process will seems to hang for serveral minutes \n    echo while the updates are installed.\n    echo the reboot at the end will start sshd and the process will continue\n\n    # prevent reconnect for next script until after the time out\n    systemctl  stop sshd\n    ps -ef | grep ssh | grep -v grep  | awk &amp;#39;{print $2}&amp;#39; | xargs kill\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Workaround for <a href=\"https:\/\/bugzilla.novell.com\/show_bug.cgi?id=821879\">SuSE bug 821879 &#8211; udev update breaks network:<\/a> <a href=\"https:\/\/mnm.at\/markus\/2014\/03\/27\/using-packer-to-build-the-opensuse-123-update-part-3\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[5],"tags":[6,7],"class_list":["post-36","post","type-post","status-publish","format-standard","hentry","category-tech","tag-linux","tag-opensuse"],"_links":{"self":[{"href":"https:\/\/mnm.at\/markus\/wp-json\/wp\/v2\/posts\/36","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mnm.at\/markus\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mnm.at\/markus\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mnm.at\/markus\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/mnm.at\/markus\/wp-json\/wp\/v2\/comments?post=36"}],"version-history":[{"count":1,"href":"https:\/\/mnm.at\/markus\/wp-json\/wp\/v2\/posts\/36\/revisions"}],"predecessor-version":[{"id":37,"href":"https:\/\/mnm.at\/markus\/wp-json\/wp\/v2\/posts\/36\/revisions\/37"}],"wp:attachment":[{"href":"https:\/\/mnm.at\/markus\/wp-json\/wp\/v2\/media?parent=36"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mnm.at\/markus\/wp-json\/wp\/v2\/categories?post=36"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mnm.at\/markus\/wp-json\/wp\/v2\/tags?post=36"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}