installer.kmdr: add a check on .installer.conf to avoid running installer script multiple time when window is minimized and reshown

installer.sh: fix a return -1 causing a syntax error
This commit is contained in:
Silvan Calarco 2011-06-11 19:52:45 +02:00
parent 3d08fe0509
commit da4d492339
4 changed files with 78 additions and 74 deletions

View File

@ -302,7 +302,7 @@
</font> </font>
</property> </property>
<property name="text"> <property name="text">
<string>Copyright (c) 2007-2010 by Silvan Calarco <string>Copyright (c) 2007-2011 by Silvan Calarco
Released under the terms of the GNU GPL v3 license</string> Released under the terms of the GNU GPL v3 license</string>
</property> </property>
<property name="textFormat"> <property name="textFormat">
@ -399,6 +399,26 @@ Released under the terms of the GNU GPL v3 license</string>
</stringlist> </stringlist>
</property> </property>
</widget> </widget>
<widget class="Label">
<property name="name">
<cstring>integrityCheckLabel</cstring>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>20</y>
<width>540</width>
<height>70</height>
</rect>
</property>
<property name="text">
<string>Please wait some time while the installation medium is checked for data integrity.
Press the skip button only if you have previously checked the medium on this computer.</string>
</property>
<property name="alignment">
<set>WordBreak|AlignVCenter</set>
</property>
</widget>
<widget class="ExecButton"> <widget class="ExecButton">
<property name="name"> <property name="name">
<cstring>skipButton</cstring> <cstring>skipButton</cstring>
@ -425,26 +445,6 @@ killall md5progress.sh
</stringlist> </stringlist>
</property> </property>
</widget> </widget>
<widget class="Label">
<property name="name">
<cstring>integrityCheckLabel</cstring>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>20</y>
<width>540</width>
<height>70</height>
</rect>
</property>
<property name="text">
<string>Please wait some time while the installation medium is checked for data integrity.
Press the skip button only if you have previously checked the medium on this computer.</string>
</property>
<property name="alignment">
<set>WordBreak|AlignVCenter</set>
</property>
</widget>
<widget class="ScriptObject"> <widget class="ScriptObject">
<property name="name"> <property name="name">
<cstring>launchMD5script</cstring> <cstring>launchMD5script</cstring>
@ -2998,6 +2998,9 @@ fi
@chainloadbox.clear @chainloadbox.clear
@setBootableCheckbox.execute() @setBootableCheckbox.execute()
@execBegin @execBegin
conffile=~/.installer.conf
[ -e $conffile ] &amp;&amp; mv ${conffile} ${conffile}~
installdevice=@String.section(@devicesbox.item(@devicesbox.currentItem)," ",0) installdevice=@String.section(@devicesbox.item(@devicesbox.currentItem)," ",0)
volumes=`hal-find-by-capability --capability volume` volumes=`hal-find-by-capability --capability volume`
partlabel= partlabel=
@ -3097,6 +3100,30 @@ Installation time may vary but it is typically within 5 and 20 minutes.</string>
<set>WordBreak|AlignTop</set> <set>WordBreak|AlignTop</set>
</property> </property>
</widget> </widget>
<widget class="Label">
<property name="name">
<cstring>installTopLabel</cstring>
</property>
<property name="geometry">
<rect>
<x>70</x>
<y>0</y>
<width>490</width>
<height>50</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>16</pointsize>
</font>
</property>
<property name="text">
<string>Installation in progress...</string>
</property>
<property name="alignment">
<set>AlignCenter</set>
</property>
</widget>
<widget class="GroupBox"> <widget class="GroupBox">
<property name="name"> <property name="name">
<cstring>ProgressGroupBox</cstring> <cstring>ProgressGroupBox</cstring>
@ -3175,27 +3202,6 @@ Installation time may vary but it is typically within 5 and 20 minutes.</string>
</property> </property>
</widget> </widget>
</widget> </widget>
<widget class="ProgressBar">
<property name="name">
<cstring>progressBar</cstring>
</property>
<property name="geometry">
<rect>
<x>16</x>
<y>35</y>
<width>530</width>
<height>41</height>
</rect>
</property>
<property name="totalSteps">
<number>100</number>
</property>
<property name="associations" stdset="0">
<stringlist>
<string></string>
</stringlist>
</property>
</widget>
<widget class="Label"> <widget class="Label">
<property name="name"> <property name="name">
<cstring>progressText</cstring> <cstring>progressText</cstring>
@ -3228,6 +3234,27 @@ Installation time may vary but it is typically within 5 and 20 minutes.</string>
<set>AlignTop</set> <set>AlignTop</set>
</property> </property>
</widget> </widget>
<widget class="ProgressBar">
<property name="name">
<cstring>progressBar</cstring>
</property>
<property name="geometry">
<rect>
<x>16</x>
<y>35</y>
<width>530</width>
<height>41</height>
</rect>
</property>
<property name="totalSteps">
<number>100</number>
</property>
<property name="associations" stdset="0">
<stringlist>
<string></string>
</stringlist>
</property>
</widget>
<widget class="ScriptObject"> <widget class="ScriptObject">
<property name="name"> <property name="name">
<cstring>launchinstall</cstring> <cstring>launchinstall</cstring>
@ -3245,6 +3272,7 @@ Installation time may vary but it is typically within 5 and 20 minutes.</string>
<string>@NextBox.setChecked(false) <string>@NextBox.setChecked(false)
@execBegin @execBegin
conffile=~/.installer.conf conffile=~/.installer.conf
[ -e $conffile ] &amp;&amp; return
cat &gt; $conffile &lt;&lt; _EOF cat &gt; $conffile &lt;&lt; _EOF
# #
# openmamba installation file # openmamba installation file
@ -3310,30 +3338,6 @@ fi
</property> </property>
</widget> </widget>
</widget> </widget>
<widget class="Label">
<property name="name">
<cstring>installTopLabel</cstring>
</property>
<property name="geometry">
<rect>
<x>70</x>
<y>0</y>
<width>490</width>
<height>50</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>16</pointsize>
</font>
</property>
<property name="text">
<string>Installation in progress...</string>
</property>
<property name="alignment">
<set>AlignCenter</set>
</property>
</widget>
</widget> </widget>
<widget class="QWidget"> <widget class="QWidget">
<property name="name"> <property name="name">

View File

@ -130,7 +130,7 @@ function find_driver_for_udi() {
echo $found_driver echo $found_driver
return 0 return 0
else else
return -1 return 1
fi fi
} }
@ -138,7 +138,7 @@ DCOPID=$2
echo $"\ echo $"\
openmamba installation script - version $VERSION openmamba installation script - version $VERSION
Copyright (c) 2007-2010 by Silvan Calarco <silvan.calarco@mambasoft.it> Copyright (c) 2007-2011 by Silvan Calarco <silvan.calarco@mambasoft.it>
" "
dcop_write $"Starting installation..." 5 dcop_write $"Starting installation..." 5

View File

@ -50,9 +50,9 @@ msgstr ""
#: _from_rc.cc:12 #: _from_rc.cc:12
msgid "" msgid ""
"Copyright (c) 2007-2010 by Silvan Calarco\n" "Copyright (c) 2007-2011 by Silvan Calarco\n"
"Released under the terms of the GNU GPL v3 license" "Released under the terms of the GNU GPL v3 license"
msgstr "Copyright (c) 2007-2010 by Silvan Calarco\n" msgstr "Copyright (c) 2007-2011 by Silvan Calarco\n"
"Expedido según los términos de la licencia GNU GPL v3" "Expedido según los términos de la licencia GNU GPL v3"
#: _from_rc.cc:14 #: _from_rc.cc:14

View File

@ -49,9 +49,9 @@ msgstr ""
#: _from_rc.cc:12 #: _from_rc.cc:12
msgid "" msgid ""
"Copyright (c) 2007-2010 by Silvan Calarco\n" "Copyright (c) 2007-2011 by Silvan Calarco\n"
"Released under the terms of the GNU GPL v3 license" "Released under the terms of the GNU GPL v3 license"
msgstr "Copyright (c) 2007-2010 by Silvan Calarco\n" msgstr "Copyright (c) 2007-2011 by Silvan Calarco\n"
"Rilasciato secondo i termini della licenza GNU GPL v3" "Rilasciato secondo i termini della licenza GNU GPL v3"
#: _from_rc.cc:14 #: _from_rc.cc:14
@ -590,11 +590,11 @@ msgstr " l'operazione."
#: installer.sh:113 #: installer.sh:113
msgid "" msgid ""
"openmamba installation script - version $VERSION\n" "openmamba installation script - version $VERSION\n"
"Copyright (c) 2007-2010 by Silvan Calarco <silvan.calarco@mambasoft.it>\n" "Copyright (c) 2007-2011 by Silvan Calarco <silvan.calarco@mambasoft.it>\n"
"" ""
msgstr "" msgstr ""
"script di installazione di openmamba - versione $VERSION\n" "script di installazione di openmamba - versione $VERSION\n"
"Copyright (c) 2007-2010 by Silvan Calarco <silvan.calarco@mambasoft.it>\n" "Copyright (c) 2007-2011 by Silvan Calarco <silvan.calarco@mambasoft.it>\n"
"" ""
#: installer.sh:118 #: installer.sh:118
msgid "Starting installation..." msgid "Starting installation..."