#!/usr/bin/perl

@ARGV == 1 or die "usage $0: <cvslog2changelog script>\n";

($script) = @ARGV;

$date = (split('/', `grep ChangeLog perl-install/CVS/Entries`))[3];

@changelog = `(cvs log -d ">$date" docs mdk-stage1 rescue tools ; cd perl-install; cvs log -d ">$date") | $script`;
@before = `cat perl-install/ChangeLog`;

open F, ">perl-install/ChangeLog";
print F foreach @changelog, @before;

`cvs commit -m '' perl-install/ChangeLog` =~ /new revision: (.*?);/;

print "$1\n";
print foreach @changelog;
>
<body>
<div id='cgit'><table id='header'>
<tr>
<td class='logo' rowspan='2'><a href='/'><img src='//nav.mageia.org/css/mageia-logo-nav-3.png' alt='cgit logo'/></a></td>
<td class='main'><a href='/'>index</a> : <a title='drakx' href='/software/drakx/'>drakx</a></td><td class='form'><form method='get'>
<input type='hidden' name='id' value='b3f4a6839de1ecd67b9a1fb0189bf6fdf71b5491'/><select name='h' onchange='this.form.submit();'>
<option value='distro/mdv2007.1'>distro/mdv2007.1</option>
<option value='distro/mdv2008.0'>distro/mdv2008.0</option>
<option value='distro/mdv2008.1'>distro/mdv2008.1</option>
<option value='distro/mdv2009.0'>distro/mdv2009.0</option>
<option value='distro/mdv2009.1'>distro/mdv2009.1</option>
<option value='distro/mdv2010.0'>distro/mdv2010.0</option>
<option value='distro/mes5'>distro/mes5</option>
<option value='distro/mes5-2.6.33'>distro/mes5-2.6.33</option>
<option value='distro/mes6'>distro/mes6</option>
<option value='distro/mga1'>distro/mga1</option>
<option value='distro/mga2'>distro/mga2</option>
<option value='distro/mga3'>distro/mga3</option>
<option value='distro/mga4'>distro/mga4</option>
<option value='distro/mga5'>distro/mga5</option>
<option value='distro/mga6'>distro/mga6</option>
<option value='distro/mga7'>distro/mga7</option>
<option value='distro/mga8'>distro/mga8</option>
<option value='distro/mga9'>distro/mga9</option>
<option value='master'>master</option>
<option value='topic/Corpo_2_1'>topic/Corpo_2_1</option>
<option value='topic/KA9_0'>topic/KA9_0</option>
<option value='topic/MDK-10-update'>topic/MDK-10-update</option>
<option value='topic/MDK-10_1-update'>topic/MDK-10_1-update</option>
<option value='topic/MDK-10_2-update'>topic/MDK-10_2-update</option>
<option value='topic/MDK-2006_0-update'>topic/MDK-2006_0-update</option>
<option value='topic/MDK92-branch'>topic/MDK92-branch</option>
<option value='topic/MDKC_1_0'>topic/MDKC_1_0</option>
<option value='topic/PCMCIA_CS_DISTRO'>topic/PCMCIA_CS_DISTRO</option>
<option value='topic/R9_0-64bit-branch'>topic/R9_0-64bit-branch</option>
<option value='topic/R9_1_HP-branch'>topic/R9_1_HP-branch</option>
<option value='topic/a'>topic/a</option>
<option value='topic/before_matchbox_wm'>topic/before_matchbox_wm</option>
<option value='topic/bug-13680'>topic/bug-13680</option>
<option value='topic/dietlibc'>topic/dietlibc</option>
<option value='topic/efi'>topic/efi</option>
<option value='topic/extlinux'>topic/extlinux</option>
<option value='topic/firewall'>topic/firewall</option>
<option value='topic/gdk-pixbuf-0-branch'>topic/gdk-pixbuf-0-branch</option>
<option value='topic/gi-ppc'>topic/gi-ppc</option>
<option value='topic/ia64-8_1'>topic/ia64-8_1</option>
<option value='topic/mandrakesoft'>topic/mandrakesoft</option>
<option value='topic/mlcd4'>topic/mlcd4</option>
<option value='topic/ppp'>topic/ppp</option>
<option value='topic/rp-pppoe'>topic/rp-pppoe</option>
<option value='topic/switching_to_dnf'>topic/switching_to_dnf</option>
<option value='topic/switching_to_urpmi'>topic/switching_to_urpmi</option>
<option value='topic/unlabeled-1.1.1'>topic/unlabeled-1.1.1</option>
<option value='topic/v_webmin_0_87'>topic/v_webmin_0_87</option>
<option value='topic/x86_64-branch'>topic/x86_64-branch</option>
<option value='user/animtim/designWork'>user/animtim/designWork</option>
<option value='user/colin/rescue-systemd'>user/colin/rescue-systemd</option>
<option value='user/ennael/mga6'>user/ennael/mga6</option>
<option value='user/erwan/bug-13680'>user/erwan/bug-13680</option>
<option value='user/jibz/aarch64'>user/jibz/aarch64</option>
<option value='user/martinw/mga6'>user/martinw/mga6</option>
<option value='user/pterjan/arm64'>user/pterjan/arm64</option>
</select> <input type='submit' value='switch'/></form></td></tr>
<tr><td class='sub'>Mageia Installer and base platform for many utilities</td><td class='sub right'>Thierry Vignaud [tv]</td></tr></table>
<table class='tabs'><tr><td>
<a href='/software/drakx/?h=16.61'>summary</a><a href='/software/drakx/refs/?h=16.61&amp;id=b3f4a6839de1ecd67b9a1fb0189bf6fdf71b5491'>refs</a><a href='/software/drakx/log/globetrotter/make_live?h=16.61'>log</a><a class='active' href='/software/drakx/tree/globetrotter/make_live?h=16.61&amp;id=b3f4a6839de1ecd67b9a1fb0189bf6fdf71b5491'>tree</a><a href='/software/drakx/commit/globetrotter/make_live?h=16.61&amp;id=b3f4a6839de1ecd67b9a1fb0189bf6fdf71b5491'>commit</a><a href='/software/drakx/diff/globetrotter/make_live?h=16.61&amp;id=b3f4a6839de1ecd67b9a1fb0189bf6fdf71b5491'>diff</a><a href='/software/drakx/stats/globetrotter/make_live?h=16.61'>stats</a></td><td class='form'><form class='right' method='get' action='/software/drakx/log/globetrotter/make_live'>
<input type='hidden' name='h' value='16.61'/><input type='hidden' name='id' value='b3f4a6839de1ecd67b9a1fb0189bf6fdf71b5491'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/software/drakx/tree/?h=16.61&amp;id=b3f4a6839de1ecd67b9a1fb0189bf6fdf71b5491'>root</a>/<a href='/software/drakx/tree/globetrotter?h=16.61&amp;id=b3f4a6839de1ecd67b9a1fb0189bf6fdf71b5491'>globetrotter</a>/<a href='/software/drakx/tree/globetrotter/make_live?h=16.61&amp;id=b3f4a6839de1ecd67b9a1fb0189bf6fdf71b5491'>make_live</a></div><div class='content'>blob: e721da4d6845755aefbbf2b24ca5102cb1677cb5 (<a href='/software/drakx/plain/globetrotter/make_live?h=16.61&amp;id=b3f4a6839de1ecd67b9a1fb0189bf6fdf71b5491'>plain</a>)
<table summary='blob content' class='blob'>
<tr><td class='linenumbers'><pre><a id='n1' href='#n1'>1</a>
<a id='n2' href='#n2'>2</a>
<a id='n3' href='#n3'>3</a>
<a id='n4' href='#n4'>4</a>
<a id='n5' href='#n5'>5</a>
<a id='n6' href='#n6'>6</a>
<a id='n7' href='#n7'>7</a>
<a id='n8' href='#n8'>8</a>
<a id='n9' href='#n9'>9</a>
<a id='n10' href='#n10'>10</a>
<a id='n11' href='#n11'>11</a>
<a id='n12' href='#n12'>12</a>
<a id='n13' href='#n13'>13</a>
<a id='n14' href='#n14'>14</a>
<a id='n15' href='#n15'>15</a>
<a id='n16' href='#n16'>16</a>
<a id='n17' href='#n17'>17</a>
<a id='n18' href='#n18'>18</a>
<a id='n19' href='#n19'>19</a>
<a id='n20' href='#n20'>20</a>
<a id='n21' href='#n21'>21</a>
<a id='n22' href='#n22'>22</a>
<a id='n23' href='#n23'>23</a>
<a id='n24' href='#n24'>24</a>
<a id='n25' href='#n25'>25</a>
<a id='n26' href='#n26'>26</a>
<a id='n27' href='#n27'>27</a>
<a id='n28' href='#n28'>28</a>
<a id='n29' href='#n29'>29</a>
<a id='n30' href='#n30'>30</a>
<a id='n31' href='#n31'>31</a>
<a id='n32' href='#n32'>32</a>
<a id='n33' href='#n33'>33</a>
<a id='n34' href='#n34'>34</a>
<a id='n35' href='#n35'>35</a>
<a id='n36' href='#n36'>36</a>
<a id='n37' href='#n37'>37</a>
<a id='n38' href='#n38'>38</a>
<a id='n39' href='#n39'>39</a>
<a id='n40' href='#n40'>40</a>
<a id='n41' href='#n41'>41</a>
<a id='n42' href='#n42'>42</a>
<a id='n43' href='#n43'>43</a>
<a id='n44' href='#n44'>44</a>
<a id='n45' href='#n45'>45</a>
<a id='n46' href='#n46'>46</a>
<a id='n47' href='#n47'>47</a>
<a id='n48' href='#n48'>48</a>
<a id='n49' href='#n49'>49</a>
<a id='n50' href='#n50'>50</a>
<a id='n51' href='#n51'>51</a>
<a id='n52' href='#n52'>52</a>
<a id='n53' href='#n53'>53</a>
<a id='n54' href='#n54'>54</a>
<a id='n55' href='#n55'>55</a>
<a id='n56' href='#n56'>56</a>
<a id='n57' href='#n57'>57</a>
<a id='n58' href='#n58'>58</a>
<a id='n59' href='#n59'>59</a>
<a id='n60' href='#n60'>60</a>
<a id='n61' href='#n61'>61</a>
<a id='n62' href='#n62'>62</a>
<a id='n63' href='#n63'>63</a>
<a id='n64' href='#n64'>64</a>
<a id='n65' href='#n65'>65</a>
<a id='n66' href='#n66'>66</a>
<a id='n67' href='#n67'>67</a>
<a id='n68' href='#n68'>68</a>
<a id='n69' href='#n69'>69</a>
<a id='n70' href='#n70'>70</a>
<a id='n71' href='#n71'>71</a>
<a id='n72' href='#n72'>72</a>
<a id='n73' href='#n73'>73</a>
<a id='n74' href='#n74'>74</a>
<a id='n75' href='#n75'>75</a>
<a id='n76' href='#n76'>76</a>
<a id='n77' href='#n77'>77</a>
<a id='n78' href='#n78'>78</a>
<a id='n79' href='#n79'>79</a>
<a id='n80' href='#n80'>80</a>
<a id='n81' href='#n81'>81</a>
<a id='n82' href='#n82'>82</a>
<a id='n83' href='#n83'>83</a>
<a id='n84' href='#n84'>84</a>
<a id='n85' href='#n85'>85</a>
<a id='n86' href='#n86'>86</a>
<a id='n87' href='#n87'>87</a>
<a id='n88' href='#n88'>88</a>
<a id='n89' href='#n89'>89</a>
<a id='n90' href='#n90'>90</a>
<a id='n91' href='#n91'>91</a>
<a id='n92' href='#n92'>92</a>
<a id='n93' href='#n93'>93</a>
<a id='n94' href='#n94'>94</a>
<a id='n95' href='#n95'>95</a>
<a id='n96' href='#n96'>96</a>
<a id='n97' href='#n97'>97</a>
<a id='n98' href='#n98'>98</a>
<a id='n99' href='#n99'>99</a>
<a id='n100' href='#n100'>100</a>
<a id='n101' href='#n101'>101</a>
<a id='n102' href='#n102'>102</a>
<a id='n103' href='#n103'>103</a>
<a id='n104' href='#n104'>104</a>
<a id='n105' href='#n105'>105</a>
<a id='n106' href='#n106'>106</a>
<a id='n107' href='#n107'>107</a>
<a id='n108' href='#n108'>108</a>
<a id='n109' href='#n109'>109</a>
<a id='n110' href='#n110'>110</a>
<a id='n111' href='#n111'>111</a>
<a id='n112' href='#n112'>112</a>
<a id='n113' href='#n113'>113</a>
<a id='n114' href='#n114'>114</a>
<a id='n115' href='#n115'>115</a>
<a id='n116' href='#n116'>116</a>
<a id='n117' href='#n117'>117</a>
<a id='n118' href='#n118'>118</a>
<a id='n119' href='#n119'>119</a>
<a id='n120' href='#n120'>120</a>
<a id='n121' href='#n121'>121</a>
<a id='n122' href='#n122'>122</a>
<a id='n123' href='#n123'>123</a>
<a id='n124' href='#n124'>124</a>
<a id='n125' href='#n125'>125</a>
<a id='n126' href='#n126'>126</a>
<a id='n127' href='#n127'>127</a>
<a id='n128' href='#n128'>128</a>
<a id='n129' href='#n129'>129</a>
<a id='n130' href='#n130'>130</a>
<a id='n131' href='#n131'>131</a>
<a id='n132' href='#n132'>132</a>
<a id='n133' href='#n133'>133</a>
<a id='n134' href='#n134'>134</a>
<a id='n135' href='#n135'>135</a>
<a id='n136' href='#n136'>136</a>
<a id='n137' href='#n137'>137</a>
<a id='n138' href='#n138'>138</a>
<a id='n139' href='#n139'>139</a>
<a id='n140' href='#n140'>140</a>
<a id='n141' href='#n141'>141</a>
<a id='n142' href='#n142'>142</a>
<a id='n143' href='#n143'>143</a>
<a id='n144' href='#n144'>144</a>
<a id='n145' href='#n145'>145</a>
<a id='n146' href='#n146'>146</a>
<a id='n147' href='#n147'>147</a>
<a id='n148' href='#n148'>148</a>
<a id='n149' href='#n149'>149</a>
<a id='n150' href='#n150'>150</a>
<a id='n151' href='#n151'>151</a>
<a id='n152' href='#n152'>152</a>
<a id='n153' href='#n153'>153</a>
<a id='n154' href='#n154'>154</a>
<a id='n155' href='#n155'>155</a>
<a id='n156' href='#n156'>156</a>
<a id='n157' href='#n157'>157</a>
<a id='n158' href='#n158'>158</a>
<a id='n159' href='#n159'>159</a>
<a id='n160' href='#n160'>160</a>
<a id='n161' href='#n161'>161</a>
<a id='n162' href='#n162'>162</a>
<a id='n163' href='#n163'>163</a>
<a id='n164' href='#n164'>164</a>
<a id='n165' href='#n165'>165</a>
<a id='n166' href='#n166'>166</a>
<a id='n167' href='#n167'>167</a>
<a id='n168' href='#n168'>168</a>
<a id='n169' href='#n169'>169</a>
<a id='n170' href='#n170'>170</a>
<a id='n171' href='#n171'>171</a>
<a id='n172' href='#n172'>172</a>
<a id='n173' href='#n173'>173</a>
<a id='n174' href='#n174'>174</a>
<a id='n175' href='#n175'>175</a>
<a id='n176' href='#n176'>176</a>
<a id='n177' href='#n177'>177</a>
<a id='n178' href='#n178'>178</a>
<a id='n179' href='#n179'>179</a>
<a id='n180' href='#n180'>180</a>
<a id='n181' href='#n181'>181</a>
<a id='n182' href='#n182'>182</a>
<a id='n183' href='#n183'>183</a>
<a id='n184' href='#n184'>184</a>
<a id='n185' href='#n185'>185</a>
<a id='n186' href='#n186'>186</a>
<a id='n187' href='#n187'>187</a>
<a id='n188' href='#n188'>188</a>
<a id='n189' href='#n189'>189</a>
<a id='n190' href='#n190'>190</a>
<a id='n191' href='#n191'>191</a>
<a id='n192' href='#n192'>192</a>
<a id='n193' href='#n193'>193</a>
<a id='n194' href='#n194'>194</a>
<a id='n195' href='#n195'>195</a>
<a id='n196' href='#n196'>196</a>
<a id='n197' href='#n197'>197</a>
<a id='n198' href='#n198'>198</a>
<a id='n199' href='#n199'>199</a>
<a id='n200' href='#n200'>200</a>
<a id='n201' href='#n201'>201</a>
<a id='n202' href='#n202'>202</a>
<a id='n203' href='#n203'>203</a>
<a id='n204' href='#n204'>204</a>
<a id='n205' href='#n205'>205</a>
<a id='n206' href='#n206'>206</a>
<a id='n207' href='#n207'>207</a>
<a id='n208' href='#n208'>208</a>
<a id='n209' href='#n209'>209</a>
<a id='n210' href='#n210'>210</a>
<a id='n211' href='#n211'>211</a>
<a id='n212' href='#n212'>212</a>
<a id='n213' href='#n213'>213</a>
<a id='n214' href='#n214'>214</a>
<a id='n215' href='#n215'>215</a>
<a id='n216' href='#n216'>216</a>
<a id='n217' href='#n217'>217</a>
<a id='n218' href='#n218'>218</a>
<a id='n219' href='#n219'>219</a>
<a id='n220' href='#n220'>220</a>
<a id='n221' href='#n221'>221</a>
<a id='n222' href='#n222'>222</a>
<a id='n223' href='#n223'>223</a>
<a id='n224' href='#n224'>224</a>
<a id='n225' href='#n225'>225</a>
<a id='n226' href='#n226'>226</a>
<a id='n227' href='#n227'>227</a>
<a id='n228' href='#n228'>228</a>
<a id='n229' href='#n229'>229</a>
<a id='n230' href='#n230'>230</a>
<a id='n231' href='#n231'>231</a>
<a id='n232' href='#n232'>232</a>
<a id='n233' href='#n233'>233</a>
<a id='n234' href='#n234'>234</a>
<a id='n235' href='#n235'>235</a>
<a id='n236' href='#n236'>236</a>
<a id='n237' href='#n237'>237</a>
<a id='n238' href='#n238'>238</a>
<a id='n239' href='#n239'>239</a>
<a id='n240' href='#n240'>240</a>
<a id='n241' href='#n241'>241</a>
<a id='n242' href='#n242'>242</a>
<a id='n243' href='#n243'>243</a>
<a id='n244' href='#n244'>244</a>
<a id='n245' href='#n245'>245</a>
<a id='n246' href='#n246'>246</a>
<a id='n247' href='#n247'>247</a>
<a id='n248' href='#n248'>248</a>
<a id='n249' href='#n249'>249</a>
<a id='n250' href='#n250'>250</a>
<a id='n251' href='#n251'>251</a>
<a id='n252' href='#n252'>252</a>
<a id='n253' href='#n253'>253</a>
<a id='n254' href='#n254'>254</a>
<a id='n255' href='#n255'>255</a>
<a id='n256' href='#n256'>256</a>
<a id='n257' href='#n257'>257</a>
<a id='n258' href='#n258'>258</a>
<a id='n259' href='#n259'>259</a>
<a id='n260' href='#n260'>260</a>
<a id='n261' href='#n261'>261</a>
<a id='n262' href='#n262'>262</a>
<a id='n263' href='#n263'>263</a>
<a id='n264' href='#n264'>264</a>
<a id='n265' href='#n265'>265</a>
<a id='n266' href='#n266'>266</a>
<a id='n267' href='#n267'>267</a>
<a id='n268' href='#n268'>268</a>
<a id='n269' href='#n269'>269</a>
<a id='n270' href='#n270'>270</a>
<a id='n271' href='#n271'>271</a>
<a id='n272' href='#n272'>272</a>
<a id='n273' href='#n273'>273</a>
<a id='n274' href='#n274'>274</a>
<a id='n275' href='#n275'>275</a>
<a id='n276' href='#n276'>276</a>
<a id='n277' href='#n277'>277</a>
<a id='n278' href='#n278'>278</a>
<a id='n279' href='#n279'>279</a>
<a id='n280' href='#n280'>280</a>
<a id='n281' href='#n281'>281</a>
<a id='n282' href='#n282'>282</a>
<a id='n283' href='#n283'>283</a>
<a id='n284' href='#n284'>284</a>
<a id='n285' href='#n285'>285</a>
<a id='n286' href='#n286'>286</a>
<a id='n287' href='#n287'>287</a>
<a id='n288' href='#n288'>288</a>
<a id='n289' href='#n289'>289</a>
<a id='n290' href='#n290'>290</a>
<a id='n291' href='#n291'>291</a>
<a id='n292' href='#n292'>292</a>
<a id='n293' href='#n293'>293</a>
<a id='n294' href='#n294'>294</a>
<a id='n295' href='#n295'>295</a>
<a id='n296' href='#n296'>296</a>
<a id='n297' href='#n297'>297</a>
<a id='n298' href='#n298'>298</a>
<a id='n299' href='#n299'>299</a>
<a id='n300' href='#n300'>300</a>
<a id='n301' href='#n301'>301</a>
<a id='n302' href='#n302'>302</a>
<a id='n303' href='#n303'>303</a>
<a id='n304' href='#n304'>304</a>
<a id='n305' href='#n305'>305</a>
<a id='n306' href='#n306'>306</a>
<a id='n307' href='#n307'>307</a>
<a id='n308' href='#n308'>308</a>
<a id='n309' href='#n309'>309</a>
<a id='n310' href='#n310'>310</a>
<a id='n311' href='#n311'>311</a>
<a id='n312' href='#n312'>312</a>
<a id='n313' href='#n313'>313</a>
<a id='n314' href='#n314'>314</a>
<a id='n315' href='#n315'>315</a>
<a id='n316' href='#n316'>316</a>
<a id='n317' href='#n317'>317</a>
<a id='n318' href='#n318'>318</a>
<a id='n319' href='#n319'>319</a>
<a id='n320' href='#n320'>320</a>
<a id='n321' href='#n321'>321</a>
<a id='n322' href='#n322'>322</a>
<a id='n323' href='#n323'>323</a>
<a id='n324' href='#n324'>324</a>
<a id='n325' href='#n325'>325</a>
<a id='n326' href='#n326'>326</a>
<a id='n327' href='#n327'>327</a>
<a id='n328' href='#n328'>328</a>
<a id='n329' href='#n329'>329</a>
<a id='n330' href='#n330'>330</a>
<a id='n331' href='#n331'>331</a>
<a id='n332' href='#n332'>332</a>
<a id='n333' href='#n333'>333</a>
<a id='n334' href='#n334'>334</a>
<a id='n335' href='#n335'>335</a>
<a id='n336' href='#n336'>336</a>
<a id='n337' href='#n337'>337</a>
<a id='n338' href='#n338'>338</a>
<a id='n339' href='#n339'>339</a>
<a id='n340' href='#n340'>340</a>
<a id='n341' href='#n341'>341</a>
<a id='n342' href='#n342'>342</a>
<a id='n343' href='#n343'>343</a>
<a id='n344' href='#n344'>344</a>
<a id='n345' href='#n345'>345</a>
<a id='n346' href='#n346'>346</a>
<a id='n347' href='#n347'>347</a>
<a id='n348' href='#n348'>348</a>
<a id='n349' href='#n349'>349</a>
<a id='n350' href='#n350'>350</a>
<a id='n351' href='#n351'>351</a>
<a id='n352' href='#n352'>352</a>
<a id='n353' href='#n353'>353</a>
<a id='n354' href='#n354'>354</a>
<a id='n355' href='#n355'>355</a>
<a id='n356' href='#n356'>356</a>
<a id='n357' href='#n357'>357</a>
<a id='n358' href='#n358'>358</a>
<a id='n359' href='#n359'>359</a>
<a id='n360' href='#n360'>360</a>
<a id='n361' href='#n361'>361</a>
<a id='n362' href='#n362'>362</a>
<a id='n363' href='#n363'>363</a>
<a id='n364' href='#n364'>364</a>
<a id='n365' href='#n365'>365</a>
<a id='n366' href='#n366'>366</a>
<a id='n367' href='#n367'>367</a>
<a id='n368' href='#n368'>368</a>
<a id='n369' href='#n369'>369</a>
<a id='n370' href='#n370'>370</a>
<a id='n371' href='#n371'>371</a>
<a id='n372' href='#n372'>372</a>
<a id='n373' href='#n373'>373</a>
<a id='n374' href='#n374'>374</a>
<a id='n375' href='#n375'>375</a>
<a id='n376' href='#n376'>376</a>
<a id='n377' href='#n377'>377</a>
<a id='n378' href='#n378'>378</a>
<a id='n379' href='#n379'>379</a>
<a id='n380' href='#n380'>380</a>
<a id='n381' href='#n381'>381</a>
<a id='n382' href='#n382'>382</a>
<a id='n383' href='#n383'>383</a>
<a id='n384' href='#n384'>384</a>
<a id='n385' href='#n385'>385</a>
<a id='n386' href='#n386'>386</a>
<a id='n387' href='#n387'>387</a>
<a id='n388' href='#n388'>388</a>
<a id='n389' href='#n389'>389</a>
<a id='n390' href='#n390'>390</a>
<a id='n391' href='#n391'>391</a>
<a id='n392' href='#n392'>392</a>
<a id='n393' href='#n393'>393</a>
<a id='n394' href='#n394'>394</a>
<a id='n395' href='#n395'>395</a>
<a id='n396' href='#n396'>396</a>
<a id='n397' href='#n397'>397</a>
<a id='n398' href='#n398'>398</a>
<a id='n399' href='#n399'>399</a>
<a id='n400' href='#n400'>400</a>
<a id='n401' href='#n401'>401</a>
<a id='n402' href='#n402'>402</a>
<a id='n403' href='#n403'>403</a>
<a id='n404' href='#n404'>404</a>
<a id='n405' href='#n405'>405</a>
<a id='n406' href='#n406'>406</a>
<a id='n407' href='#n407'>407</a>
<a id='n408' href='#n408'>408</a>
<a id='n409' href='#n409'>409</a>
<a id='n410' href='#n410'>410</a>
<a id='n411' href='#n411'>411</a>
<a id='n412' href='#n412'>412</a>
<a id='n413' href='#n413'>413</a>
<a id='n414' href='#n414'>414</a>
<a id='n415' href='#n415'>415</a>
<a id='n416' href='#n416'>416</a>
<a id='n417' href='#n417'>417</a>
<a id='n418' href='#n418'>418</a>
<a id='n419' href='#n419'>419</a>
<a id='n420' href='#n420'>420</a>
<a id='n421' href='#n421'>421</a>
<a id='n422' href='#n422'>422</a>
<a id='n423' href='#n423'>423</a>
<a id='n424' href='#n424'>424</a>
<a id='n425' href='#n425'>425</a>
<a id='n426' href='#n426'>426</a>
<a id='n427' href='#n427'>427</a>
<a id='n428' href='#n428'>428</a>
<a id='n429' href='#n429'>429</a>
<a id='n430' href='#n430'>430</a>
<a id='n431' href='#n431'>431</a>
<a id='n432' href='#n432'>432</a>
<a id='n433' href='#n433'>433</a>
<a id='n434' href='#n434'>434</a>
<a id='n435' href='#n435'>435</a>
<a id='n436' href='#n436'>436</a>
<a id='n437' href='#n437'>437</a>
<a id='n438' href='#n438'>438</a>
<a id='n439' href='#n439'>439</a>
<a id='n440' href='#n440'>440</a>
<a id='n441' href='#n441'>441</a>
<a id='n442' href='#n442'>442</a>
<a id='n443' href='#n443'>443</a>
<a id='n444' href='#n444'>444</a>
<a id='n445' href='#n445'>445</a>
<a id='n446' href='#n446'>446</a>
<a id='n447' href='#n447'>447</a>
<a id='n448' href='#n448'>448</a>
<a id='n449' href='#n449'>449</a>
<a id='n450' href='#n450'>450</a>
<a id='n451' href='#n451'>451</a>
<a id='n452' href='#n452'>452</a>
<a id='n453' href='#n453'>453</a>
<a id='n454' href='#n454'>454</a>
<a id='n455' href='#n455'>455</a>
<a id='n456' href='#n456'>456</a>
<a id='n457' href='#n457'>457</a>
<a id='n458' href='#n458'>458</a>
<a id='n459' href='#n459'>459</a>
<a id='n460' href='#n460'>460</a>
<a id='n461' href='#n461'>461</a>
</pre></td>
<td class='lines'><pre><code>#!/usr/bin/perl

$::isInstall = 1; # for /root/drakx/ddebug.log

use strict;
#use lib qw(/usr/lib/libDrakX);
use lib &quot;../perl-install&quot;;
use standalone;
use interactive;
use common;
use partition_table;
use fsedit;
use fs;
use any;
use pkgs;
use class_discard;
use run_program;
use log;

# my $in = interactive-&gt;vnew;

$::isStandalone = undef;  # for /tmp/ddebug.log

my (%options, &#64;new_ARGV);

foreach (&#64;ARGV) {
    if (/^--(.*)/) {
        $options{$1} = 1;
    } else {
        push &#64;new_ARGV, $_;
    }
}

my $rescue;

if ($0 =~ /restore_globetrotter/) {
    %options = (install =&gt; 1, post =&gt; 1);
    $rescue = 1;
}

&#64;ARGV = &#64;new_ARGV;

my &#64;suggestions = (
                   { mntpoint =&gt; &quot;/&quot;,     size =&gt; 4500 &lt;&lt; 11, type =&gt; 0x483, ratio =&gt; 1, maxsize =&gt; 6000 &lt;&lt; 11 },
                   # splited / and /usr:
                   # { mntpoint =&gt; &quot;/&quot;,     size =&gt; 250 &lt;&lt; 11, type =&gt; 0x483, ratio =&gt; 1, maxsize =&gt; 2000 &lt;&lt; 11 },
                   # { mntpoint =&gt; &quot;/usr&quot;,  size =&gt; 300 &lt;&lt; 11, type =&gt; 0x483, ratio =&gt; 4, maxsize =&gt; 4000 &lt;&lt; 11 },
                   { mntpoint =&gt; &quot;/home&quot;, size =&gt; 100 &lt;&lt; 11, type =&gt; 0x483, ratio =&gt; 3 },

                   # share partition with windows:
                   { mntpoint =&gt; &quot;/mnt/share&quot;,  size =&gt; 2000 &lt;&lt; 11, type =&gt; 0xb, ratio =&gt; 2, maxsize =&gt; 10000 &lt;&lt; 11 },
                   { mntpoint =&gt; &quot;/mnt/packages&quot;, size =&gt; 7500 &lt;&lt; 11, type =&gt; 0x483, ratio =&gt; 3, maxsize =&gt; 7500 &lt;&lt; 11 },
                   # allocated last b/c end of disk is usually faster:
                   { mntpoint =&gt; &quot;swap&quot;,  size =&gt;  64 &lt;&lt; 11, type =&gt; 0x82, ratio =&gt; 1, maxsize =&gt;  500 &lt;&lt; 11 },
                  );


sub get_hds() {
	my $all_hds = fsedit::get_hds();
     my $other;
	($all_hds-&gt;{hds}, $other) = partition { $_-&gt;{usb_description} eq &apos;LaCie|LaCie Hard Drive USB&apos; } &#64;{$all_hds-&gt;{hds}};
	die &quot;I did not found any LaCie disk\n&quot; if !$all_hds-&gt;{hds}[0];
	$all_hds, $all_hds-&gt;{hds}[0]; # $other
}


sub prepare_disk() {
    # repartion the hard disk:
    print &quot;PARTITIONNING\n&quot;;
    my ($all_hds, $hd, $other) = get_hds();
    # partition_table::remove($hd, $_) while partition_table::get_normal_parts($hd);
    run_program::run(&quot;swapoff&quot;, &quot;/dev/$all_hds-&gt;{hds}[0]{device}8&quot;) if any { /$all_hds-&gt;{hds}[0]{device}/ } cat_(&quot;/proc/partitions&quot;);

    partition_table::raw::zero_MBR_and_dirty($hd);
    fsedit::allocatePartitions($all_hds, \&#64;suggestions);
    require diskdrake::interactive;
    require class_discard;
    # diskdrake::interactive::write_partitions(class_discard-&gt;new, $_, &apos;skip_check_rebootNeeded&apos;) foreach (&#64;{$all_hds-&gt;{hds}});
    foreach (&#64;{$all_hds-&gt;{hds}}) {
	    local $::isStandalone = undef;
	    print &quot;WRITE PARTITION ON $_-&gt;{file}\n&quot;;
	    diskdrake::interactive::write_partitions(class_discard-&gt;new, $_, &apos;skip_check_rebootNeeded&apos;)
    }
    # partition_table::write(&#64;{$all_hds-&gt;{hds}});
    ($all_hds, $hd, $other);
}


sub formatdisk {
    my ($hd) = &#64;_;
    print &quot;FORMATTING\n&quot;;
    foreach (partition_table::get_normal_parts($hd)) { 
        print qq(Formatting &quot;$_-&gt;{device}&quot; ($_-&gt;{mntpoint})\n); 
        fs::format_part(undef, $_, $::prefix, undef) if !$::testing;
    }
}


#&#64;ARGV &lt;= 1 or die &quot;usage: make_live [live_location=/tmp/live_tree]\n&quot;;

    if (!find { m!/proc/bus/usb! } run_program::get_stdout(&apos;mount&apos;)) {
        warn &quot;USB service is *NOT* started&quot; if !$rescue;
        run_program::get_stdout(&apos;service&apos;, &apos;usb&apos;, &apos;start&apos;);
    }

my $pkg_dev;
if ($rescue) {
    system(&quot;mount -t tmpfs none /tmp&quot;);
    # let be able to see USB devices:
    system(&quot;mount -t usbfs none /proc/bus/usb&quot;);
    system(&quot;modprobe usb-storage; modprobe sd_mod&quot;);
    # let be able to detect SCSI hds:
    mkdir(&quot;/sys&quot;);
    system(&quot;mount -t sysfs none /sys&quot;);

    my ($all_hds, $hd, $other) = get_hds();
    print &quot;Looking for the package partition\n&quot;;
    my &#64;parts = partition_table::get_normal_parts($hd);
    my $pkg_dev = find { member(fs::type2fs($_), qw(ext2 ext3)) &amp;&amp; chomp_(`e2label /dev/$_-&gt;{device} 2&gt;/dev/root`) eq &quot;MDK-PKGS&quot; } &#64;parts;
    die &quot;I cannot find the package partition which is needed in order to restore the system!&quot; if is_empty_hash_ref($pkg_dev) || !$pkg_dev-&gt;{device};
    my $root = find { member(fs::type2fs($_), qw(ext2 ext3)) &amp;&amp; chomp_(`e2label /dev/$_-&gt;{device} 2&gt;/dev/root`) eq &quot;MDK-ROOT&quot; } &#64;parts;
    $root = find { $_-&gt;{device} eq &quot;sda1&quot; } &#64;parts if is_empty_hash_ref($root);
    die &quot;I cannot find any hard disk to restore!&quot; if is_empty_hash_ref($root) || !$root-&gt;{device};
    print &quot;Please wait, disk reinstallation is in progress, this can take quite some time\n&quot;;
    print &quot;Formating $root-&gt;{device}\n&quot;;
    system(&quot;mkfs.ext2 -j /dev/$root-&gt;{device} &gt; /dev/null\n&quot;);

}

sub installPackages() {
    local $::testing = undef;

    # for a gconftool-2 cleaner:
    my $pid = fork();
    !defined $pid and die(&quot;cannot fork: $!&quot;);
    !$pid and do {
        while (1) {
            sleep(10);
            run_program::run(&apos;/usr/bin/killall&apos;, &apos;gconftool-2&apos;);
        }
    };
    my $_b = before_leaving { kill &apos;TERM&apos;, $pid if $pid };

    # ensure no %_install_langs:
    output_p(&quot;$::prefix/etc/rpm/macros&quot;, &quot;%_install_langs all\n&quot;);
    # ensure boot from USB will work:
    output_p(&quot;$::prefix/etc/sysconfig/mkinitrd&quot;, &quot;forceusb=yes\n&quot;);

    mkdir_p(&quot;$::prefix/var/lib/rpm&quot;);
    mkdir_p(&quot;$::prefix/root/drakx&quot;);


    undef *install_any::setDefaultPackages;
    *install_any::setDefaultPackages = sub {};

    undef *install_any::getFile;
    *install_any::getFile = sub {
	my ($f, $o_method) = &#64;_;
	log::l(&quot;getFile $f:$o_method&quot;);
	open(my $F, &apos;/export/&apos; . install_any::relGetFile($f)) or return;
	$F;
    };

    undef *c::kernel_version;
    *c::kernel_version = sub {
	#my &#64;l = glob_(&apos;/export/Mandrake/RPMS/kernel-enterprise-2.6*&apos;);
	my &#64;l = glob_(&apos;/export/Mandrake/RPMS/kernel-2.6*&apos;);
	&#64;l &gt;= 1 or die  &quot;can&apos;t find kernel&quot;;
	&#64;l &lt;= 1 or die &quot;too many kernels&quot;;
	first(`rpm -qp --qf &apos;%{name}&apos; $l[0]` =~ /kernel-(.*)/);
    };

    my $kernel_version = c::kernel_version();

    print &quot;INSTALLING\n&quot;;
    install_any::setPackages(my $o = $::o =
                             { 
                              prefix =&gt; $::prefix, 
                              meta_class =&gt; &apos;desktop&apos;, 
                              default_packages =&gt; [
				 #- for screenshots:
				 qw(fb2png),
				 qw(XFree86-server XFree86-xfs XFree86-FBDev),
				 qw(openssh-server), #- fred wants it
				 qw(alsa-utils cdialog newt),
                     qw(k3b-dvd),
				 qw(davfs nfs-utils samba-server sane-backends xsane xsane-gimp ntp),
                     qw(acpi acpid), #- so that removing acpi=ht will work
				 qw(mountloop),	#- crypted folders
				 qw(mandrake-doc-en mandrake-doc-fr mandrake-doc-drakxtools-en mandrake-doc-drakxtools-fr),
				 qw(autologin),
				 qw(synaptics),
				 #- network conf:
				 qw(wireless-tools pcmcia-cs),
				 #- zeroconf:
				 qw(zcip dhcpcd tmdns),
				 #- cnx stuff:
				 qw(dhcp-client ppp kdenetwork-kppp ppp-pppoatm ppp-pppoe pptp-linux pptp-adsl rp-pppoe),
				 #- ISDN stuff:
				 # qw(isdn4net ibod isdn4k-utils), # not installed since it provides an interface (will be automatically installed by drakconnect)
				 #- network file sharing:
				 qw(nfs-utils-clients samba-client),
				 #- network drivers and firmwares:
				 qw(eagle-usb speedtouch speedtouch_mgmt unicorn),
				 #- alt kernels:
				 # glob_(&apos;/export/Mandrake/RPMS/kernel-2.4*&apos;), #- for ISDN
				 #- configuration:
				 qw(drakconf drakcronat drakfirsttime drakxtools harddrake-ui mdkonline rpmdrake userdrake2),
				 qw(cups cups-drivers foomatic-db gimpprint hpoj libnet-snmp mtools mtoolsfm nmap printer-filters printer-testpages printer-utils scli xojpanel xpp), #- printer stuff
				 &quot;ATI_kernel-$kernel_version&quot;, qw(ATI_GLX ATI_GLX-utils NVIDIA_GLX libMesaGLU1), # ATI_GLX requires ATI_kernel
				 &quot;NVIDIA_kernel-$kernel_version&quot;,
				 # qw(hcfpcimodem hsflinmodem ltmodem), #- 2.4.x only
				 qw(xinput), #- for some mice
				 qw(bash-completion binutils  emacs-X11 ntsysv perl-doc perl-Term-Readline-Gnu),  #- allow debugging
				 qw(openssh-askpass-gnome),  #- openssh-askpass for mountloop doesn&apos;t allow to click on ok/cancel buttons
				 qw(clanbomber freeciv-client freeciv-server crack-attack kdegames),  #- more games
				 qw(numlock),  # shorewall # not installed since its default config breaks network (will be automatically installed by drakfirewall)
				 qw(xawtv zapping),  #- tv apps
				 qw(scribus scribus-i18n-de scribus-i18n-fr),  #- John Jablonski says it&apos;s so much useful
                     (map { &quot;OpenOffice.org-l10n-$_&quot; } qw(ar ca cs da de el en es eu fi fr it ja ko nl pl pt pt_BR ru sk sv tr zh_CN zh_TW)),
				 qw(dosfstools mtools),
				 qw(koffice konsole),
				 qw(devfsd dynamic harddrake hotplug magicdev mandrake-globetrotter netprofile),
				 qw(gnome2),
				 qw(alsa-utils),
				 qw(ipw2100 ipw2100_kernel ipw2100_kernel-2.6.3.13mdk), # ipw2100_kernel-$kernel_version,
                     #- fonts:
				 qw(XFree86-100dpi-fonts XFree86-75dpi-fonts),
				 qw(fonts-bitmap-tscii fonts-hebrew-elmar),
                     (map { &quot;fonts-ttf-$_&quot; } qw(arabic armenian bengali big5 decoratives ethiopic gb2312 japanese kannada korean latex tamil thai tscii vera west_european)),
                     (map { &quot;fonts-type1-$_&quot; } qw(cyrillic greek hebrew)),
                     ],
					    });

    my %compssUsersChoice = map { $_ =&gt; 1 } map { &#64;{$_-&gt;{flags}} } values %{$o-&gt;{compssUsers}};
    $compssUsersChoice{$_} = 1 foreach &apos;SYSTEM&apos;, &apos;DVD&apos;, &apos;USB&apos;, &apos;SOUND&apos;, &apos;BURNER&apos;, &apos;UTF8&apos;, &apos;DOCS&apos;, &apos;TV&apos;, &apos;3D&apos;, &apos;INSTALL&apos;;
    $compssUsersChoice{qq(LOCALES&quot;$_&quot;)} = 1 foreach lang::langsLANGUAGE({ all =&gt; 1 });

    pkgs::setSelectedFromCompssList($o-&gt;{packages}, \%compssUsersChoice, 4, 0);

    my $unselect = sub {
        my ($pkg) = &#64;_;
        my $p = pkgs::packageByName($o-&gt;{packages}, $pkg);
        pkgs::unselectPackage($o-&gt;{packages}, $p) if $p;
    };

    # unselect some packages whose services fsck up the box and whose services are not enabled by appropriate tools:
    # (shorewall must be deselected before iptables is)
    $unselect-&gt;($_) foreach qw(at hpoj shorewall iptables ntp tmdns zcip );

    # unselect uim since uim IM break first time wizard when selecting english:
    $unselect-&gt;($_) foreach qw(uim-applet uim libuim0);

    my &#64;toInstall = pkgs::packagesToInstall($o-&gt;{packages});
    local $ENV{DURING_INSTALL} = 1;
    $ENV{LD_LIBRARY_PATH} = &quot;/lib:/usr/lib:/usr/X11R6/lib:/usr/lib/qt3/lib&quot;;
    pkgs::install($::prefix, 0, \&#64;toInstall, $o-&gt;{packages});
    
    eval { fs::umount(&quot;$::prefix/proc&quot;) };
}

sub config_X_proprietary_drivers() {
    unlink &quot;$::prefix/usr/lib/libGL.so&quot;;

    my %name_to_Driver = (NVIDIA_GLX =&gt; &apos;nvidia&apos;, ATI_GLX =&gt; &apos;fglrx&apos;);

    my $lib = &apos;libGL.so.1&apos;;
    symlinkf(&quot;/etc/X11/$lib&quot;, &quot;$::prefix/usr/lib/$lib&quot;);
    foreach (keys %name_to_Driver) {
	my ($full_name) = run_program::rooted_get_stdout($::prefix, &apos;rpm&apos;, &apos;-ql&apos;, $_) =~ m!/usr/lib/(\Q$lib\E\..*)! or die &apos;&apos;;
	symlinkf($full_name, &quot;$::prefix/usr/lib/$lib.$name_to_Driver{$_}&quot;);
    }
    #- remove the dirty hack done by NVIDIA_kernel-xxx proprietary package
    #- we do it by hand when needed
    substInFile { $_ = &apos;&apos; if $_ eq &apos;nvidia&apos; } &quot;$::prefix/etc/modules&quot;;
}

$::prefix = $ARGV[0] || &apos;/tmp/live_tree&apos;;

-d $::prefix or mkdir $::prefix;
print &quot;Making live in $::prefix directory.\n&quot;;


my ($all_hds, $hd, $other) = do {
    # here we want testing so that diskdrake still set mount points in data structure:
    local $::testing = !$options{partition};
    prepare_disk();
};

formatdisk($hd) if $options{format};

add2hash($hd, $other);

undef $::testing;

my &#64;parts = partition_table::get_normal_parts($hd);

my ($root) = grep { $_-&gt;{mntpoint} eq &quot;/&quot; } &#64;parts;
print &quot;Root is $root-&gt;{device}\n&quot;;
run_program::run(&apos;tune2fs&apos;, &apos;-L&apos;, &quot;MDK-ROOT&quot;, &quot;/dev/$root-&gt;{device}&quot;);
# fs::mount_part($root, $::prefix);
my $fstab = [ fsedit::get_all_fstab($all_hds) ];

# we need to mount every fs we want to see into /etc/fstab !!!
fs::mount_part($_, $::prefix) foreach sort { $a-&gt;{mntpoint} cmp $b-&gt;{mntpoint} } &#64;$fstab;

symlink(&quot;$::prefix/mnt/packages&quot;, &quot;/export&quot;) if $rescue;

eval {
    print &quot;Installing packages\n&quot;;
    installPackages();
} if $options{install};
print &quot;ERROR WHILE INSTALLING PACKAGES: $&#64;\n&quot; if $&#64;;
log::closeLog;

sub doRootSubst {
    my ($file) = &#64;_;
    substInFile {
        s!/dev/$root-&gt;{device}!LABEL=MDK-ROOT!g;
    } $file;
}

#fs::merge_info_from_mtab($fstab);
fs::write_fstab($all_hds, $::prefix);
append_to_file(&quot;$::prefix/etc/fstab&quot;, &quot;none /dev/pts devpts mode=0620 0 0&quot;);
doRootSubst(&quot;$::prefix/etc/fstab&quot;);

my ($home) = grep { $_-&gt;{mntpoint} eq &quot;/home&quot; } &#64;parts;
my ($mnt_pkgs) = grep { $_-&gt;{mntpoint} eq &quot;/mnt/packages&quot; } &#64;parts;
run_program::run(&apos;tune2fs&apos;, &apos;-L&apos;, &quot;MDK-HOME&quot;, &quot;/dev/$home-&gt;{device}&quot;) if $home;
run_program::run(&apos;tune2fs&apos;, &apos;-L&apos;, &quot;MDK-PKGS&quot;, &quot;/dev/$mnt_pkgs-&gt;{device}&quot;) if $mnt_pkgs;

substInFile {
    s!defaults\s!defaults,ro ! if m!/mnt/packages!;
    s!defaults\s!defaults,umask=0000 ! if m!/mnt/share!;
    s!/dev/$home-&gt;{device}!LABEL=MDK-HOME!g;
    s!/dev/$mnt_pkgs-&gt;{device}!LABEL=MDK-PKGS!g;
} &quot;$::prefix/etc/fstab&quot;;


#-------------------------------------------------------------------
#- Bootloader
print &quot;Configuring bootloader\n&quot;;
system(&quot;modprobe loop&quot;);
require keyboard;
require bootloader;

my $bootloader = {
                  keytable =&gt; keyboard::keyboard2kmap(keyboard::lang2keyboard(&apos;fr&apos;)),
		  bios =&gt; { &apos;/dev/sda&apos; =&gt; &apos;0x80&apos; },
                 };

bootloader::suggest($bootloader, $all_hds-&gt;{hds}, $fstab,
                    vga_fb =&gt; 788, 
                    quiet =&gt; 1);

# LILO failled to boot from SCSI:
# $bootloader-&gt;{method} = &apos;lilo-graphic&apos;;
$bootloader-&gt;{method} = &apos;grub&apos;;

eval { bootloader::install($bootloader, $fstab, $all_hds-&gt;{hds}) };

doRootSubst(&quot;$::prefix/boot/grub/menu.lst&quot;);
run_program::rooted($::prefix, &apos;sh&apos;, &apos;/boot/grub/install.sh&apos;);

# fix GRUB configuration:
substInFile {
    # use FB by default on versionned entries so that the initial versionned entry behave like those created by /sbin/installkernel:
    s/$/ vga=788/ if /^kernel.*\d\.\d\.\d/;
    # set devfs=mount as well so that installkernel can properly install bootable 2.4.x kernels:
    s/$/ devfs=mount/ if /^kernel/ &amp;&amp; !/failsafe/;
} &quot;$::prefix/boot/grub/menu.lst&quot;;


## disable ISDN by default (bogus isdn4net came with an enabled interface :-():
#substInFile {
#    s/#ONBOOT.*/ONBOOT=&quot;no&quot;/
#} &quot;$::prefix/etc/sysconfig/network-scripts/ifcfg-ippp0&quot;;
#

print &quot;Post install misc configuration\n&quot;;


# clean services:
# cups-lpd ibod isdn4linux isdnlog)) {
run_program::rooted($::prefix, &apos;/sbin/chkconfig&apos;, &apos;--del&apos;, $_) foreach qw(acon jserver oki4daemon);
#foreach my $service (qw(acon atd cups-lpd hpoj ibod iptables isdn4linux isdnlog jserver ntpd oki4daemon shorewall tmdns)) {
#    run_program::rooted($::prefix, &apos;/sbin/chkconfig&apos;, &apos;--level&apos;, $_, $service, &apos;off&apos;) foreach qw(3 5);
#}

# probably useless:
foreach my $service (qw(alsa dm harddrake hotplug sound)) {
    run_program::rooted($::prefix, &apos;/sbin/chkconfig&apos;, &apos;--level&apos;, $_, $service,  &apos;on&apos;) foreach qw(3 5);
}

if ($options{post}) {
    #-------------------------------------------------------------------
    # save a few more files in profiles
    my $prof_cfg = &quot;$::prefix/etc/netprofile/list&quot;;
    my &#64;files = map { chomp_($_) } cat_($prof_cfg);
    # do not save the whole /etc/sysconfig;
    push &#64;files, (map { &quot;/etc/X11/$_&quot; } qw(XF86Config XF86Config-4)),
      (map { &quot;/etc/sysconfig/$_&quot; } qw(keyboard harddrake2/previous_hw harddisks)),
        (map { &quot;/etc/$_&quot; } qw(modprobe.conf modprobe.devfs modprobe.preload modules modules.conf modules.devfs)),
          qw(/etc/asound.state /etc/fstab /etc/ld.so.conf/GL.conf /etc/shorewall/);

    output($prof_cfg, join(&quot;\n&quot;, sort &#64;files));


    #-------------------------------------------------------------------
    #- regenerate library loader and fonts cache
    run_program::rooted($::prefix, &apos;ldconfig&apos;);
    any::fix_broken_alternatives();
    run_program::rooted($::prefix, &apos;fc-cache&apos;); #- generate cache in all directories mentioned in config file

    #- XFree

    touch(&quot;$::prefix/etc/menu/enable_simplified&quot;);

    {
        local $ENV{LC_ALL} = &apos;en_US&apos;; #- update-menus doesn&apos;t work when there is no locale (aka locale &quot;C&quot;)
        #local $ENV{HOME} = &apos;/&apos;; #- savekdemimetypes.pl needs this otherwise it&apos;s tmp file fails
        run_program::rooted($::prefix, &apos;update-menus&apos;, &apos;-n&apos;);
    }

    run_program::rooted($::prefix, &apos;nspluginscan&apos;); #- must be run before kbuildsycoca for the ksycoca to be flash plugin aware

    $ENV{HELP_BROWSER} = &quot;kfmclient openProfile webbrowsing&quot;;
    $ENV{BROWSER} = &quot;kfmclient openProfile webbrowsing&quot;;
    $ENV{DESKTOP} = &quot;kde&quot;;
    #- faster boot:
    foreach my $lang (lang::list_langs()) {
        local $ENV{LC_ALL} = lang::getLANGUAGE($lang);
        unlink &quot;$::prefix/usr/share/services/ksycoca&quot;;
        run_program::rooted($::prefix, &apos;kbuildsycoca&apos;, &apos;--global&apos;);
        rename(&quot;$::prefix/usr/share/services/ksycoca&quot;, &quot;$::prefix/usr/share/services/ksycoca-$lang&quot;);
    }
    symlinkf(&apos;/etc/X11/ksycoca&apos;, &quot;$::prefix/usr/share/services/ksycoca&quot;);
}

# clean gconftool-2 mess:
unlink $_ foreach glob(&quot;$::prefix/core.*&quot;);


##- Mandrake
#substInFile {
#    s!Mandrake(l| L)inux release (\S+) \(.*\)!Mandrakelinux Nomad, powered by LaCie Mobile Hard Drive)!;
#} &quot;$::prefix/etc/mandrake-release&quot;;
#


system(&quot;rsync -rvltp /export/ $::prefix/mnt/packages/&quot;) if !$rescue;
unlink $_ foreach glob(&quot;$::prefix/var/lib/urpmi/*&quot;);
run_program::rooted($::prefix, &apos;urpmi.addmedia&apos;, &apos;-h&apos;, &apos;main&apos;, &apos;file:///mnt/packages/Mandrake/RPMS&apos;);
run_program::rooted($::prefix, &apos;urpmi.addmedia&apos;, &apos;-h&apos;, &apos;contrib&apos;, &apos;file:///mnt/packages/Mandrake/RPMS2&apos;);

# for fast test replaying:
run_program::rooted($::prefix, &apos;tar&apos;, &apos;cfj&apos;, &apos;/root/etc.tar.bz2&apos;, &apos;/etc&apos;);

system(&quot;umount $::prefix/proc&quot;);
eval { fs::umount_all($fstab, $::prefix) } or system(&quot;umount $::prefix&quot;); 
</code></pre></td></tr></table>
</div> <!-- class=content -->
<div class='footer'>generated by <a href='https://git.zx2c4.com/cgit/about/'>cgit v1.2.1</a> (<a href='https://git-scm.com/'>git 2.21.0</a>) at 2025-03-03 23:57:03 +0000</div>
</div> <!-- id=cgit -->
</body>
</html>