{"id":327,"date":"2016-10-23T02:27:27","date_gmt":"2016-10-23T00:27:27","guid":{"rendered":"http:\/\/it-merge.com\/?p=327"},"modified":"2016-12-26T00:03:33","modified_gmt":"2016-12-25T23:03:33","slug":"upgrade-omv-to-3-x-takes-me-hours","status":"publish","type":"post","link":"https:\/\/it-merge.com\/?p=327","title":{"rendered":"Upgrade OMV to 3.X takes me hours"},"content":{"rendered":"<h1>Easy upgrade<\/h1>\n<p>Yea that upgrade is easy to start by<\/p>\n<pre>omv-update &amp;&amp; omv-release-upgrade<\/pre>\n<p>but it stopped on my system with the message that sed had an issue within configuration step of openmediavault.<\/p>\n<h1>Expensive mistake in openmediavault.postinst script<\/h1>\n<p>Well either there was really a mistake, or my \/etc\/openmediavault\/config.xml file was simple wrong at the position to query the \/system\/notification\/notifications\/id in file \/var\/lib\/dpkg\/info\/openmediavault.postinst.<\/p>\n<p>Issue was<\/p>\n<pre>xmlstarlet sel -t -m \"\/config\/system\/notification\/notifications\/*\" -v \"<span style=\"color: #ff0000;\">name(.)<\/span>\" -n -b \/etc\/openmediavault\/config.xml | xmlstarlet unesc<\/pre>\n<p>didn&#8217;t found the id in my config.xml. So I changed it after hours of searching to<\/p>\n<pre>xmlstarlet sel -t -m \"\/config\/system\/notification\/notifications\/*\" -v \"<span style=\"color: #ff0000;\">id<\/span>\" -n\u00a0 \/etc\/openmediavault\/config.xml | xmlstarlet unesc<\/pre>\n<p>Take a look to the<\/p>\n<pre>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 if dpkg --compare-versions \"$2\" lt-nl \"3.0.15\"; then\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # Modify the notification settings.\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 xmlstarlet sel -t -m \"\/config\/system\/notification\/notifications\/*\" \\\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 -v <span style=\"color: #ff0000;\">\"id\"<\/span> -n \\\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ${OMV_CONFIG_FILE} | xmlstarlet unesc |\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 while read id; do\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 enable=$(omv_config_get \"\/config\/system\/notification\/notifications\/${id}\")\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 object=\"&lt;uuid&gt;$(omv_uuid)&lt;\/uuid&gt;\"\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 object=\"${object}&lt;id&gt;${id}&lt;\/id&gt;\"\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 object=\"${object}&lt;enable&gt;${enable}&lt;\/enable&gt;\"\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 omv_config_add_node_data \"\/config\/system\/notification\/notifications\" \"notification\" \"${object}\"\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 omv_config_delete \"\/config\/system\/notification\/notifications\/${id}\"\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 done\r\n\r\n\r\n<\/pre>\n<p>After this small change it&#8217;s working and the package openmediavault is configured successful.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Easy upgrade Yea that upgrade is easy to start by omv-update &amp;&amp; omv-release-upgrade but it stopped on my system with[&#8230;]<\/p>\n","protected":false},"author":2,"featured_media":359,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[34],"class_list":["post-327","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-nas","tag-omv"],"_links":{"self":[{"href":"https:\/\/it-merge.com\/index.php?rest_route=\/wp\/v2\/posts\/327","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/it-merge.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/it-merge.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/it-merge.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/it-merge.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=327"}],"version-history":[{"count":3,"href":"https:\/\/it-merge.com\/index.php?rest_route=\/wp\/v2\/posts\/327\/revisions"}],"predecessor-version":[{"id":330,"href":"https:\/\/it-merge.com\/index.php?rest_route=\/wp\/v2\/posts\/327\/revisions\/330"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/it-merge.com\/index.php?rest_route=\/wp\/v2\/media\/359"}],"wp:attachment":[{"href":"https:\/\/it-merge.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=327"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/it-merge.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=327"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/it-merge.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=327"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}