]> pere.pagekite.me Git - homepage.git/blob - blog/archive/2013/11/index.html
Generated.
[homepage.git] / blog / archive / 2013 / 11 / index.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
4 <head>
5 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
6 <title>Petter Reinholdtsen: entries from November 2013</title>
7 <link rel="stylesheet" type="text/css" media="screen" href="http://people.skolelinux.org/pere/blog/style.css" />
8 <link rel="stylesheet" type="text/css" media="screen" href="http://people.skolelinux.org/pere/blog/vim.css" />
9 <link rel="alternate" title="RSS Feed" href="11.rss" type="application/rss+xml" />
10 </head>
11 <body>
12 <!-- XML FEED -->
13 <div class="title">
14 <h1>
15 <a href="http://people.skolelinux.org/pere/blog/">Petter Reinholdtsen</a>
16
17 </h1>
18
19 </div>
20
21
22 <h3>Entries from November 2013.</h3>
23
24 <div class="entry">
25 <div class="title">
26 <a href="http://people.skolelinux.org/pere/blog/Hvor_godt_fungerer_Linux_klienter_mot_MS_Exchange_.html">Hvor godt fungerer Linux-klienter mot MS Exchange?</a>
27 </div>
28 <div class="date">
29 26th November 2013
30 </div>
31 <div class="body">
32 <p>Jeg
33 <a href="http://people.skolelinux.org/pere/blog/_pent_m_te_p__onsdag_om_bruken_av_Microsoft_Exchange_ved_Universitetet_i_Oslo.html">skrev
34 i juni om protestene</a> på planene til min arbeidsplass,
35 <a href="http://www.uio.no/">Universitetet i Oslo</a>, om å gå bort fra
36 fri programvare- og åpne standardløsninger for å håndtere epost,
37 vekk fra IETF-standarden SIEVE for filtrering av epost og over til
38 godseide spesifikasjoner og epostsystemet Microsoft Exchange.
39 Protestene har fått litt ny omtale i media de siste dagene, i tillegg
40 til de oppslagene som kom i mai.</p>
41
42 <ul>
43
44 <li>2013-11-26 <a href="http://www.version2.dk/artikel/gigantisk-outlook-konvertering-moeder-protester-paa-universitet-55147">Gigantisk Outlook-konvertering møder protester på universitet</a> - versjon2.dk</li>
45
46 <li>2013-11-25
47 <a href="http://www.idg.no/computerworld/article279407.ece">Microsoft-protest
48 på Universitetet</a> - Computerworld</li>
49
50 <li>2013-11-25
51 <a href="http://www.uniforum.uio.no/nyheter/2013/11/uio-bor-bruke-apen-programvare.html">Kjemper
52 mot innføring av Microsoft Exchange på UiO</a> - Uniforum</li>
53
54 <li>2013-11-25
55 <a href="http://www.uniforum.uio.no/nyheter/2013/11/uio-utsetter-innforing-av-nytt-e-postsystem.html">Utsetter
56 innføring av nytt e-postsystem</a> - Uniforum</li>
57
58 <li>2013-05-29
59 <a href="http://universitas.no/nyhet/58462/forsvarer-nytt-it-system">Forsvarer
60 nytt IT-system</a> - Universitas</li>
61
62 <li>2013-05-23
63 <a href="http://www.uniforum.uio.no/nyheter/2013/05/uio-innforer-nytt-epost-og-kalendersystem.html">UiO
64 innfører nytt epost- og kalenderverktøy</a> - Uniforum</li>
65
66 <li>2013-05-22
67 <a href="http://universitas.no/nyhet/58424/protestgruppe-vil-stanse-it-system">Protestgruppe
68 vil stanse IT-system</a> - Universitas</li>
69
70 <li>2013-05-15
71 <a href="http://www.uniforum.uio.no/leserbrev/2013/uio-ma-ha-kontroll-over-sitt-eget-epostsystem.html">UiO
72 må ha kontroll over sitt eget epostsystem</a> - Uniforum</li>
73
74 </ul>
75
76 <p>Prosjektledelsen har fortalt at dette skal fungere like godt for
77 Linux-brukere som for brukere av Microsoft Windows og Apple MacOSX,
78 men jeg lurer på hva slags erfaringer Linux-brukere i eksisterende
79 miljøer som bruker MS Exchange har gjort. Hvis du har slik erfaring
80 hadet det vært veldig fint om du kan send et leserbrev til
81 <a href="http://www.uniforum.uio.no/">Uniforum</a> og fortelle om hvor
82 greit det er å bruke Exchange i kryss-platform-miljøer? De jeg har
83 snakket med sier en greit får lest e-posten sin hvis Exchange har
84 slått på IMAP-funksjonalitet, men at kalender og møtebooking ikke
85 fungerer godt for Linux-klienter. Jeg har ingen personlig erfaring å
86 komme med, så jeg er nysgjerrig på hva andre kan dele av erfaringer
87 med universitetet.</p>
88
89 <p>Mitt ankerpunkt mot å bytte ut fri programvare som fungerer godt
90 med godseid programvare er at en mister kontroll over egen
91 infrastruktur, låser seg inn i en løsning det vil bli dyrt å komme ut
92 av, uten at en får funksjonalitet en ikke kunne skaffet seg med fri
93 programvare, eventuelt videreutviklet med de pengene som brukes på
94 overgangen til MS Exchange. Personlig planlegger jeg å fortsette å
95 laste ned all eposten min til lokal maskin for indeksering og lesing
96 med <a href=="http://notmuchmail.org">notmuch</a>, så jeg håper jeg
97 ikke blir veldig skadelidende av overgangen.</p>
98
99 <p><a href="http://dinis.linguateca.pt/Diana/ImotMSUiO.html">Underskriftslista
100 for oss som er mot endringen</a>, som omtales i artiklene, er fortsatt
101 åpen for de som vil signere på oppropet. Akkurat nå er det 298
102 personer som har signert.</p>
103
104 </div>
105 <div class="tags">
106
107
108 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/norsk">norsk</a>, <a href="http://people.skolelinux.org/pere/blog/tags/standard">standard</a>.
109
110
111 </div>
112 </div>
113 <div class="padding"></div>
114
115 <div class="entry">
116 <div class="title">
117 <a href="http://people.skolelinux.org/pere/blog/New_chrpath_release_0_15.html">New chrpath release 0.15</a>
118 </div>
119 <div class="date">
120 24th November 2013
121 </div>
122 <div class="body">
123 <p>After many years break from the package and a vain hope that
124 development would be continued by someone else, I finally pulled my
125 acts together this morning and wrapped up a new release of chrpath,
126 the command line tool to modify the rpath and runpath of already
127 compiled ELF programs. The update was triggered by the persistence of
128 Isha Vishnoi at IBM, which needed a new config.guess file to get
129 support for the ppc64le architecture (powerpc 64-bit Little Endian) he
130 is working on. I checked the
131 <a href="http://packages.qa.debian.org/chrpath">Debian</a>,
132 <a href="https://launchpad.net/ubuntu/+source/chrpath">Ubuntu</a> and
133 <a href="https://admin.fedoraproject.org/pkgdb/acls/name/chrpath">Fedora</a>
134 packages for interesting patches (failed to find the source from
135 OpenSUSE and Mandriva packages), and found quite a few nice fixes.
136 These are the release notes:</p>
137
138 <p>New in 0.15 released 2013-11-24:</p>
139
140 <ul>
141
142 <li>Updated config.sub and config.guess from the GNU project to work
143 with newer architectures. Thanks to isha vishnoi for the heads
144 up.</li>
145
146 <li>Updated README with current URLs.</li>
147
148 <li>Added byteswap fix found in Ubuntu, credited Jeremy Kerr and
149 Matthias Klose.</li>
150
151 <li>Added missing help for -k|--keepgoing option, using patch by
152 Petr Machata found in Fedora.</li>
153
154 <li>Rewrite removal of RPATH/RUNPATH to make sure the entry in
155 .dynamic is a NULL terminated string. Based on patch found in
156 Fedora credited Axel Thimm and Christian Krause.</li>
157
158 </ul>
159
160 <p>You can
161 <a href="https://alioth.debian.org/frs/?group_id=31052">download the
162 new version 0.15 from alioth</a>. Please let us know via the Alioth
163 project if something is wrong with the new release. The test suite
164 did not discover any old errors, so if you find a new one, please also
165 include a testsuite check.</p>
166
167 </div>
168 <div class="tags">
169
170
171 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
172
173
174 </div>
175 </div>
176 <div class="padding"></div>
177
178 <div class="entry">
179 <div class="title">
180 <a href="http://people.skolelinux.org/pere/blog/RSS_kilde_for_friteksts_k_i_offentlige_anbud_hos_Doffin.html">RSS-kilde for fritekstsøk i offentlige anbud hos Doffin</a>
181 </div>
182 <div class="date">
183 22nd November 2013
184 </div>
185 <div class="body">
186 <p>I fjor sommer lagde jeg en
187 <a href="http://people.skolelinux.org/pere/blog/SQL_database_med_anbud_publisert_p__Doffin.html">offentlig
188 tilgjengelig SQL-database over offentlig anbud</a> basert på skraping
189 av HTML-data fra Doffin. Den har stått og gått siden da, og har nå
190 ca. 28000 oppføringer. Jeg oppdaget da jeg tittet innom at noen
191 oppføringer var ikke blitt med, antagelig på grunn av at de fikk
192 tildelt sekvensnummer i Doffin en godt stund før de ble publisert,
193 slik at min nettsideskraper som fortsatte skrapingen der den slapp
194 sist ikke fikk dem med seg. Jeg har fikset litt slik at skraperen nå
195 ser litt tilbake i tid for å se om den har gått glipp av noen
196 oppføringer, og har skrapet på nytt fra midten av september 2013 og
197 fremover. Det bør dermed bli en mer komplett database for kommende
198 måneder. Hvis jeg får tid skal jeg forsøke å skrape "glemte" data fra
199 før midten av september 2013, men tør ikke garantere at det blir
200 prioritert med det første. </p>
201
202 <p>Men målet med denne bloggposten er å vise hvordan denne
203 Doffin-databasen kan brukes og integreres med en RSS-leser, slik at en
204 kan la datamaskinen holde et øye med Doffin-annonseringer etter
205 nøkkelord. En kan lage sitt eget søk ved å besøke
206 <ahref="https://classic.scraperwiki.com/docs/api?name=norwegian-doffin#sqlite">API-et
207 hos Scraperwiki</a>, velge format rss2 og så legge inn noe ala dette i
208 "query in SQL":</p>
209
210 <p><pre>
211 select title, scrapedurl as link, abstract as description,
212 publishdate as pubDate from 'swdata'
213 where abstract like '%linux%' or title like '%linux%'
214 order by seq desc limit 20
215 </pre></p>
216
217 <p>Dette vil søke opp alle anbud med ordet linux i oppsummering eller
218 tittel. En kan lage mer avanserte søk hvis en ønsker det. URL-en som
219 dukker opp nederst på siden kan en så gi til sin RSS-leser (jeg bruker
220 akregator selv), og så automatisk få beskjed hvis det dukker opp anbud
221 med det aktuelle nøkkelordet i teksten. Merk at kapasiteten og
222 ytelsen hos Scraperwiki er begrenset, så ikke be RSS-leseren hente ned
223 oftere enn en gang hver dag.</p>
224
225 <p>Du lurer kanskje på hva slags informasjon en kan få ut fra denne
226 databasen. Her er to RSS-kilder, med søkeordet
227 "<a href="https://api.scraperwiki.com/api/1.0/datastore/sqlite?format=rss2&name=norwegian-doffin&query=select%20title%2C%20scrapedurl%20as%20link%2C%20abstract%20as%20description%2C%0A%20%20%20%20%20%20%20publishdate%20as%20pubDate%20from%20'swdata'%0A%20%20%20where%20abstract%20like%20'%25linux%25'%20or%20title%20like%20'%25linux%25'%0A%20%20%20order%20by%20seq%20desc%20limit%2020">linux</a>",
228 søkeordet
229 "<a href="https://api.scraperwiki.com/api/1.0/datastore/sqlite?format=rss2&name=norwegian-doffin&query=select%20title%2C%20scrapedurl%20as%20link%2C%20abstract%20as%20description%2C%0A%20%20%20%20%20%20%20publishdate%20as%20pubDate%20from%20'swdata'%0A%20%20%20where%20abstract%20like%20'%25fri%20programvare%25'%20or%20title%20like%20'%25fri%20programvare%25'%0A%20%20%20order%20by%20seq%20desc%20limit%2020">fri
230 programvare</a>"
231 og søkeordet
232 "<a href="https://api.scraperwiki.com/api/1.0/datastore/sqlite?format=rss2&name=norwegian-doffin&query=select%20title%2C%20scrapedurl%20as%20link%2C%20abstract%20as%20description%2C%0A%20%20%20%20%20%20%20publishdate%20as%20pubDate%20from%20'swdata'%0A%20%20%20where%20abstract%20like%20'%25odf%25'%20or%20title%20like%20'%25odf%25'%0A%20%20%20order%20by%20seq%20desc%20limit%2020">odf</a>".
233 Det er bare å søke på det en er interessert i. Kopier gjerne
234 datasettet og sett opp din egen tjeneste hvis du vil gjøre mer
235 avanserte søk. SQLite-filen med Doffin-oppføringer kan lastes med fra
236 Scraperwiki for de som vil grave dypere.</p>
237
238 </div>
239 <div class="tags">
240
241
242 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/norsk">norsk</a>, <a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug</a>, <a href="http://people.skolelinux.org/pere/blog/tags/offentlig innsyn">offentlig innsyn</a>.
243
244
245 </div>
246 </div>
247 <div class="padding"></div>
248
249 <div class="entry">
250 <div class="title">
251 <a href="http://people.skolelinux.org/pere/blog/All_drones_should_be_radio_marked_with_what_they_do_and_who_they_belong_to.html">All drones should be radio marked with what they do and who they belong to</a>
252 </div>
253 <div class="date">
254 21st November 2013
255 </div>
256 <div class="body">
257 <p>Drones, flying robots, are getting more and more popular. The most
258 know ones are the killer drones used by some government to murder
259 people they do not like without giving them the chance of a fair
260 trial, but the technology have many good uses too, from mapping and
261 forest maintenance to photography and search and rescue. I am sure it
262 is just a question of time before "bad drones" are in the hands of
263 private enterprises and not only state criminals but petty criminals
264 too. The drone technology is very useful and very dangerous. To have
265 some control over the use of drones, I agree with Daniel Suarez in his
266 TED talk
267 "<a href="https://archive.org/details/DanielSuarez_2013G">The kill
268 decision shouldn't belong to a robot</a>", where he suggested this
269 little gem to keep the good while limiting the bad use of drones:</p>
270
271 <blockquote>
272
273 <p>Each robot and drone should have a cryptographically signed
274 I.D. burned in at the factory that can be used to track its movement
275 through public spaces. We have license plates on cars, tail numbers on
276 aircraft. This is no different. And every citizen should be able to
277 download an app that shows the population of drones and autonomous
278 vehicles moving through public spaces around them, both right now and
279 historically. And civic leaders should deploy sensors and civic drones
280 to detect rogue drones, and instead of sending killer drones of their
281 own up to shoot them down, they should notify humans to their
282 presence. And in certain very high-security areas, perhaps civic
283 drones would snare them and drag them off to a bomb disposal facility.</p>
284
285 <p>But notice, this is more an immune system than a weapons system. It
286 would allow us to avail ourselves of the use of autonomous vehicles
287 and drones while still preserving our open, civil society.</p>
288
289 </blockquote>
290
291 <p>The key is that <em>every citizen</em> should be able to read the
292 radio beacons sent from the drones in the area, to be able to check
293 both the government and others use of drones. For such control to be
294 effective, everyone must be able to do it. What should such beacon
295 contain? At least formal owner, purpose, contact information and GPS
296 location. Probably also the origin and target position of the current
297 flight. And perhaps some registration number to be able to look up
298 the drone in a central database tracking their movement. Robots
299 should not have privacy. It is people who need privacy.</p>
300
301 </div>
302 <div class="tags">
303
304
305 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/robot">robot</a>, <a href="http://people.skolelinux.org/pere/blog/tags/sikkerhet">sikkerhet</a>, <a href="http://people.skolelinux.org/pere/blog/tags/surveillance">surveillance</a>.
306
307
308 </div>
309 </div>
310 <div class="padding"></div>
311
312 <div class="entry">
313 <div class="title">
314 <a href="http://people.skolelinux.org/pere/blog/Lets_make_a_wireless_community_network_in_Oslo_.html">Lets make a wireless community network in Oslo!</a>
315 </div>
316 <div class="date">
317 13th November 2013
318 </div>
319 <div class="body">
320 <p>Today NUUG and Hackeriet announced
321 <a href="http://www.nuug.no/news/Bli_med___bygge_dugnadsnett_for_alle_i_Oslo.shtml">our
322 plans to join forces and create a wireless community network in
323 Oslo</a>. The workshop to help people get started will take place
324 Thursday 2013-11-28, but we already are collecting the geolocation of
325 people joining forces to make this happen. We have
326 <a href="https://github.com/petterreinholdtsen/meshfx-node/blob/master/oslo-nodes.geojson">9
327 locations plotted on the map</a>, but we will need more before we have
328 a connected mesh spread across Oslo. If this sound interesting to
329 you, please join us at the workshop. If you are too impatient to wait
330 15 days, please join us on the IRC channel
331 <a href="irc://irc.freenode.net/%23nuug">#nuug on irc.freenode.net</a>
332 right away. :)</p>
333
334 </div>
335 <div class="tags">
336
337
338 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/mesh network">mesh network</a>, <a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug</a>.
339
340
341 </div>
342 </div>
343 <div class="padding"></div>
344
345 <div class="entry">
346 <div class="title">
347 <a href="http://people.skolelinux.org/pere/blog/Running_TP_Link_MR3040_as_a_batman_adv_mesh_node_using_openwrt.html">Running TP-Link MR3040 as a batman-adv mesh node using openwrt</a>
348 </div>
349 <div class="date">
350 10th November 2013
351 </div>
352 <div class="body">
353 <p>Continuing my research into mesh networking, I was recommended to
354 use TP-Link 3040 and 3600 access points as mesh nodes, and the pair I
355 bought arrived on Friday. Here are my notes on how to set up the
356 MR3040 as a mesh node using
357 <a href="http://www.openwrt.org/">OpenWrt</a>.</p>
358
359 <p>I started by following the instructions on the OpenWRT wiki for
360 <a href="http://wiki.openwrt.org/toh/tp-link/tl-mr3040">TL-MR3040</a>,
361 and downloaded
362 <a href="http://downloads.openwrt.org/snapshots/trunk/ar71xx/openwrt-ar71xx-generic-tl-mr3040-v2-squashfs-factory.bin">the
363 recommended firmware image</a>
364 (openwrt-ar71xx-generic-tl-mr3040-v2-squashfs-factory.bin) and
365 uploaded it into the original web interface. The flashing went fine,
366 and the machine was available via telnet on the ethernet port. After
367 logging in and setting the root password, ssh was available and I
368 could start to set it up as a batman-adv mesh node.</p>
369
370 <p>I started off by reading the instructions from
371 <a href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=Antoine's_Research">Wireless
372 Africa</a>, which had quite a lot of useful information, but
373 eventually I followed the recipe from the Open Mesh wiki for
374 <a href="http://www.open-mesh.org/projects/batman-adv/wiki/Batman-adv-openwrt-config">using
375 batman-adv on OpenWrt</a>. A small snag was the fact that the
376 <tt>opkg install kmod-batman-adv</tt> command did not work as it
377 should. The batman-adv kernel module would fail to load because its
378 dependency crc16 was not already loaded. I
379 <a href="https://dev.openwrt.org/ticket/14452">reported the bug</a> to
380 the openwrt project and hope it will be fixed soon. But the problem
381 only seem to affect initial testing of batman-adv, as configuration
382 seem to work when booting from scratch.</p>
383
384 <p>The setup is done using files in /etc/config/. I did not bridge
385 the Ethernet and mesh interfaces this time, to be able to hook up the
386 box on my local network and log into it for configuration updates.
387 The following files were changed and look like this after modifying
388 them:</p>
389
390 <p><tt>/etc/config/network</tt></p>
391
392 <pre>
393
394 config interface 'loopback'
395 option ifname 'lo'
396 option proto 'static'
397 option ipaddr '127.0.0.1'
398 option netmask '255.0.0.0'
399
400 config globals 'globals'
401 option ula_prefix 'fdbf:4c12:3fed::/48'
402
403 config interface 'lan'
404 option ifname 'eth0'
405 option type 'bridge'
406 option proto 'dhcp'
407 option ipaddr '192.168.1.1'
408 option netmask '255.255.255.0'
409 option hostname 'tl-mr3040'
410 option ip6assign '60'
411
412 config interface 'mesh'
413 option ifname 'adhoc0'
414 option mtu '1528'
415 option proto 'batadv'
416 option mesh 'bat0'
417 </pre>
418
419 <p><tt>/etc/config/wireless</tt></p>
420 <pre>
421
422 config wifi-device 'radio0'
423 option type 'mac80211'
424 option channel '11'
425 option hwmode '11ng'
426 option path 'platform/ar933x_wmac'
427 option htmode 'HT20'
428 list ht_capab 'SHORT-GI-20'
429 list ht_capab 'SHORT-GI-40'
430 list ht_capab 'RX-STBC1'
431 list ht_capab 'DSSS_CCK-40'
432 option disabled '0'
433
434 config wifi-iface 'wmesh'
435 option device 'radio0'
436 option ifname 'adhoc0'
437 option network 'mesh'
438 option encryption 'none'
439 option mode 'adhoc'
440 option bssid '02:BA:00:00:00:01'
441 option ssid 'meshfx@hackeriet'
442 </pre>
443 <p><tt>/etc/config/batman-adv</tt></p>
444 <pre>
445
446 config 'mesh' 'bat0'
447 option interfaces 'adhoc0'
448 option 'aggregated_ogms'
449 option 'ap_isolation'
450 option 'bonding'
451 option 'fragmentation'
452 option 'gw_bandwidth'
453 option 'gw_mode'
454 option 'gw_sel_class'
455 option 'log_level'
456 option 'orig_interval'
457 option 'vis_mode'
458 option 'bridge_loop_avoidance'
459 option 'distributed_arp_table'
460 option 'network_coding'
461 option 'hop_penalty'
462
463 # yet another batX instance
464 # config 'mesh' 'bat5'
465 # option 'interfaces' 'second_mesh'
466 </pre>
467
468 <p>The mesh node is now operational. I have yet to test its range,
469 but I hope it is good. I have not yet tested the TP-Link 3600 box
470 still wrapped up in plastic.</p>
471
472 </div>
473 <div class="tags">
474
475
476 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/mesh network">mesh network</a>, <a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug</a>.
477
478
479 </div>
480 </div>
481 <div class="padding"></div>
482
483 <div class="entry">
484 <div class="title">
485 <a href="http://people.skolelinux.org/pere/blog/Debian_init_d_boot_script_example_for_rsyslog.html">Debian init.d boot script example for rsyslog</a>
486 </div>
487 <div class="date">
488 2nd November 2013
489 </div>
490 <div class="body">
491 <p>If one of the points of switching to a new init system in Debian is
492 <a href="http://thomas.goirand.fr/blog/?p=147">to get rid of huge
493 init.d scripts</a>, I doubt we need to switch away from sysvinit and
494 init.d scripts at all. Here is an example init.d script, ie a rewrite
495 of /etc/init.d/rsyslog:</p>
496
497 <p><pre>
498 #!/lib/init/init-d-script
499 ### BEGIN INIT INFO
500 # Provides: rsyslog
501 # Required-Start: $remote_fs $time
502 # Required-Stop: umountnfs $time
503 # X-Stop-After: sendsigs
504 # Default-Start: 2 3 4 5
505 # Default-Stop: 0 1 6
506 # Short-Description: enhanced syslogd
507 # Description: Rsyslog is an enhanced multi-threaded syslogd.
508 # It is quite compatible to stock sysklogd and can be
509 # used as a drop-in replacement.
510 ### END INIT INFO
511 DESC="enhanced syslogd"
512 DAEMON=/usr/sbin/rsyslogd
513 </pre></p>
514
515 <p>Pretty minimalistic to me... For the record, the original sysv-rc
516 script was 137 lines, and the above is just 15 lines, most of it meta
517 info/comments.</p>
518
519 <p>How to do this, you ask? Well, one create a new script
520 /lib/init/init-d-script looking something like this:
521
522 <p><pre>
523 #!/bin/sh
524
525 # Define LSB log_* functions.
526 # Depend on lsb-base (>= 3.2-14) to ensure that this file is present
527 # and status_of_proc is working.
528 . /lib/lsb/init-functions
529
530 #
531 # Function that starts the daemon/service
532
533 #
534 do_start()
535 {
536 # Return
537 # 0 if daemon has been started
538 # 1 if daemon was already running
539 # 2 if daemon could not be started
540 start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
541 || return 1
542 start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
543 $DAEMON_ARGS \
544 || return 2
545 # Add code here, if necessary, that waits for the process to be ready
546 # to handle requests from services started subsequently which depend
547 # on this one. As a last resort, sleep for some time.
548 }
549
550 #
551 # Function that stops the daemon/service
552 #
553 do_stop()
554 {
555 # Return
556 # 0 if daemon has been stopped
557 # 1 if daemon was already stopped
558 # 2 if daemon could not be stopped
559 # other if a failure occurred
560 start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
561 RETVAL="$?"
562 [ "$RETVAL" = 2 ] && return 2
563 # Wait for children to finish too if this is a daemon that forks
564 # and if the daemon is only ever run from this initscript.
565 # If the above conditions are not satisfied then add some other code
566 # that waits for the process to drop all resources that could be
567 # needed by services started subsequently. A last resort is to
568 # sleep for some time.
569 start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
570 [ "$?" = 2 ] && return 2
571 # Many daemons don't delete their pidfiles when they exit.
572 rm -f $PIDFILE
573 return "$RETVAL"
574 }
575
576 #
577 # Function that sends a SIGHUP to the daemon/service
578 #
579 do_reload() {
580 #
581 # If the daemon can reload its configuration without
582 # restarting (for example, when it is sent a SIGHUP),
583 # then implement that here.
584 #
585 start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
586 return 0
587 }
588
589 SCRIPTNAME=$1
590 scriptbasename="$(basename $1)"
591 echo "SN: $scriptbasename"
592 if [ "$scriptbasename" != "init-d-library" ] ; then
593 script="$1"
594 shift
595 . $script
596 else
597 exit 0
598 fi
599
600 NAME=$(basename $DAEMON)
601 PIDFILE=/var/run/$NAME.pid
602
603 # Exit if the package is not installed
604 #[ -x "$DAEMON" ] || exit 0
605
606 # Read configuration variable file if it is present
607 [ -r /etc/default/$NAME ] && . /etc/default/$NAME
608
609 # Load the VERBOSE setting and other rcS variables
610 . /lib/init/vars.sh
611
612 case "$1" in
613 start)
614 [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
615 do_start
616 case "$?" in
617 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
618 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
619 esac
620 ;;
621 stop)
622 [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
623 do_stop
624 case "$?" in
625 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
626 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
627 esac
628 ;;
629 status)
630 status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
631 ;;
632 #reload|force-reload)
633 #
634 # If do_reload() is not implemented then leave this commented out
635 # and leave 'force-reload' as an alias for 'restart'.
636 #
637 #log_daemon_msg "Reloading $DESC" "$NAME"
638 #do_reload
639 #log_end_msg $?
640 #;;
641 restart|force-reload)
642 #
643 # If the "reload" option is implemented then remove the
644 # 'force-reload' alias
645 #
646 log_daemon_msg "Restarting $DESC" "$NAME"
647 do_stop
648 case "$?" in
649 0|1)
650 do_start
651 case "$?" in
652 0) log_end_msg 0 ;;
653 1) log_end_msg 1 ;; # Old process is still running
654 *) log_end_msg 1 ;; # Failed to start
655 esac
656 ;;
657 *)
658 # Failed to stop
659 log_end_msg 1
660 ;;
661 esac
662 ;;
663 *)
664 echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
665 exit 3
666 ;;
667 esac
668
669 :
670 </pre></p>
671
672 <p>It is based on /etc/init.d/skeleton, and could be improved quite a
673 lot. I did not really polish the approach, so it might not always
674 work out of the box, but you get the idea. I did not try very hard to
675 optimize it nor make it more robust either.</p>
676
677 <p>A better argument for switching init system in Debian than reducing
678 the size of init scripts (which is a good thing to do anyway), is to
679 get boot system that is able to handle the kernel events sensibly and
680 robustly, and do not depend on the boot to run sequentially. The boot
681 and the kernel have not behaved sequentially in years.</p>
682
683 </div>
684 <div class="tags">
685
686
687 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
688
689
690 </div>
691 </div>
692 <div class="padding"></div>
693
694 <div class="entry">
695 <div class="title">
696 <a href="http://people.skolelinux.org/pere/blog/Browser_plugin_for_SPICE__spice_xpi__uploaded_to_Debian.html">Browser plugin for SPICE (spice-xpi) uploaded to Debian</a>
697 </div>
698 <div class="date">
699 1st November 2013
700 </div>
701 <div class="body">
702 <p><a href="http://www.spice-space.org/">The SPICE protocol</a> for
703 remote display access is the preferred solution with oVirt and RedHat
704 Enterprise Virtualization, and I was sad to discover the other day
705 that the browser plugin needed to use these systems seamlessly was
706 missing in Debian. The <a href="http://bugs.debian.org/668284">request
707 for a package</a> was from 2012-04-10 with no progress since
708 2013-04-01, so I decided to wrap up a package based on the great work
709 from Cajus Pollmeier and put it in a collab-maint maintained git
710 repository to get a package I could use. I would very much like
711 others to help me maintain the package (or just take over, I do not
712 mind), but as no-one had volunteered so far, I just uploaded it to
713 NEW. I hope it will be available in Debian in a few days.</p>
714
715 <p>The source is now available from
716 <a href="http://anonscm.debian.org/gitweb/?p=collab-maint/spice-xpi.git;a=summary">http://anonscm.debian.org/gitweb/?p=collab-maint/spice-xpi.git;a=summary</a>.</p>
717
718 </div>
719 <div class="tags">
720
721
722 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
723
724
725 </div>
726 </div>
727 <div class="padding"></div>
728
729 <p style="text-align: right;"><a href="11.rss"><img src="http://people.skolelinux.org/pere/blog/xml.gif" alt="RSS Feed" width="36" height="14" /></a></p>
730 <div id="sidebar">
731
732
733
734 <h2>Archive</h2>
735 <ul>
736
737 <li>2013
738 <ul>
739
740 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/01/">January (11)</a></li>
741
742 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/02/">February (9)</a></li>
743
744 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/03/">March (9)</a></li>
745
746 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/04/">April (6)</a></li>
747
748 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/05/">May (9)</a></li>
749
750 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/06/">June (10)</a></li>
751
752 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/07/">July (7)</a></li>
753
754 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/08/">August (3)</a></li>
755
756 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/09/">September (5)</a></li>
757
758 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/10/">October (7)</a></li>
759
760 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/11/">November (8)</a></li>
761
762 </ul></li>
763
764 <li>2012
765 <ul>
766
767 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/01/">January (7)</a></li>
768
769 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/02/">February (10)</a></li>
770
771 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/03/">March (17)</a></li>
772
773 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/04/">April (12)</a></li>
774
775 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/05/">May (12)</a></li>
776
777 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/06/">June (20)</a></li>
778
779 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/07/">July (17)</a></li>
780
781 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/08/">August (6)</a></li>
782
783 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/09/">September (9)</a></li>
784
785 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/10/">October (17)</a></li>
786
787 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/11/">November (10)</a></li>
788
789 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/12/">December (7)</a></li>
790
791 </ul></li>
792
793 <li>2011
794 <ul>
795
796 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/01/">January (16)</a></li>
797
798 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/02/">February (6)</a></li>
799
800 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/03/">March (6)</a></li>
801
802 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/04/">April (7)</a></li>
803
804 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/05/">May (3)</a></li>
805
806 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/06/">June (2)</a></li>
807
808 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/07/">July (7)</a></li>
809
810 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/08/">August (6)</a></li>
811
812 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/09/">September (4)</a></li>
813
814 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/10/">October (2)</a></li>
815
816 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/11/">November (3)</a></li>
817
818 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/12/">December (1)</a></li>
819
820 </ul></li>
821
822 <li>2010
823 <ul>
824
825 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/01/">January (2)</a></li>
826
827 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/02/">February (1)</a></li>
828
829 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/03/">March (3)</a></li>
830
831 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/04/">April (3)</a></li>
832
833 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/05/">May (9)</a></li>
834
835 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/06/">June (14)</a></li>
836
837 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/07/">July (12)</a></li>
838
839 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/08/">August (13)</a></li>
840
841 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/09/">September (7)</a></li>
842
843 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/10/">October (9)</a></li>
844
845 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/11/">November (13)</a></li>
846
847 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/12/">December (12)</a></li>
848
849 </ul></li>
850
851 <li>2009
852 <ul>
853
854 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/01/">January (8)</a></li>
855
856 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/02/">February (8)</a></li>
857
858 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/03/">March (12)</a></li>
859
860 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/04/">April (10)</a></li>
861
862 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/05/">May (9)</a></li>
863
864 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/06/">June (3)</a></li>
865
866 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/07/">July (4)</a></li>
867
868 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/08/">August (3)</a></li>
869
870 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/09/">September (1)</a></li>
871
872 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/10/">October (2)</a></li>
873
874 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/11/">November (3)</a></li>
875
876 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/12/">December (3)</a></li>
877
878 </ul></li>
879
880 <li>2008
881 <ul>
882
883 <li><a href="http://people.skolelinux.org/pere/blog/archive/2008/11/">November (5)</a></li>
884
885 <li><a href="http://people.skolelinux.org/pere/blog/archive/2008/12/">December (7)</a></li>
886
887 </ul></li>
888
889 </ul>
890
891
892
893 <h2>Tags</h2>
894 <ul>
895
896 <li><a href="http://people.skolelinux.org/pere/blog/tags/3d-printer">3d-printer (13)</a></li>
897
898 <li><a href="http://people.skolelinux.org/pere/blog/tags/amiga">amiga (1)</a></li>
899
900 <li><a href="http://people.skolelinux.org/pere/blog/tags/aros">aros (1)</a></li>
901
902 <li><a href="http://people.skolelinux.org/pere/blog/tags/bankid">bankid (4)</a></li>
903
904 <li><a href="http://people.skolelinux.org/pere/blog/tags/bitcoin">bitcoin (7)</a></li>
905
906 <li><a href="http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem (13)</a></li>
907
908 <li><a href="http://people.skolelinux.org/pere/blog/tags/bsa">bsa (2)</a></li>
909
910 <li><a href="http://people.skolelinux.org/pere/blog/tags/debian">debian (91)</a></li>
911
912 <li><a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu (142)</a></li>
913
914 <li><a href="http://people.skolelinux.org/pere/blog/tags/digistan">digistan (10)</a></li>
915
916 <li><a href="http://people.skolelinux.org/pere/blog/tags/docbook">docbook (10)</a></li>
917
918 <li><a href="http://people.skolelinux.org/pere/blog/tags/drivstoffpriser">drivstoffpriser (4)</a></li>
919
920 <li><a href="http://people.skolelinux.org/pere/blog/tags/english">english (229)</a></li>
921
922 <li><a href="http://people.skolelinux.org/pere/blog/tags/fiksgatami">fiksgatami (21)</a></li>
923
924 <li><a href="http://people.skolelinux.org/pere/blog/tags/fildeling">fildeling (12)</a></li>
925
926 <li><a href="http://people.skolelinux.org/pere/blog/tags/freeculture">freeculture (12)</a></li>
927
928 <li><a href="http://people.skolelinux.org/pere/blog/tags/freedombox">freedombox (5)</a></li>
929
930 <li><a href="http://people.skolelinux.org/pere/blog/tags/frikanalen">frikanalen (11)</a></li>
931
932 <li><a href="http://people.skolelinux.org/pere/blog/tags/intervju">intervju (37)</a></li>
933
934 <li><a href="http://people.skolelinux.org/pere/blog/tags/isenkram">isenkram (7)</a></li>
935
936 <li><a href="http://people.skolelinux.org/pere/blog/tags/kart">kart (18)</a></li>
937
938 <li><a href="http://people.skolelinux.org/pere/blog/tags/ldap">ldap (8)</a></li>
939
940 <li><a href="http://people.skolelinux.org/pere/blog/tags/lenker">lenker (6)</a></li>
941
942 <li><a href="http://people.skolelinux.org/pere/blog/tags/ltsp">ltsp (1)</a></li>
943
944 <li><a href="http://people.skolelinux.org/pere/blog/tags/mesh network">mesh network (5)</a></li>
945
946 <li><a href="http://people.skolelinux.org/pere/blog/tags/multimedia">multimedia (25)</a></li>
947
948 <li><a href="http://people.skolelinux.org/pere/blog/tags/norsk">norsk (238)</a></li>
949
950 <li><a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug (159)</a></li>
951
952 <li><a href="http://people.skolelinux.org/pere/blog/tags/offentlig innsyn">offentlig innsyn (9)</a></li>
953
954 <li><a href="http://people.skolelinux.org/pere/blog/tags/open311">open311 (2)</a></li>
955
956 <li><a href="http://people.skolelinux.org/pere/blog/tags/opphavsrett">opphavsrett (45)</a></li>
957
958 <li><a href="http://people.skolelinux.org/pere/blog/tags/personvern">personvern (67)</a></li>
959
960 <li><a href="http://people.skolelinux.org/pere/blog/tags/raid">raid (1)</a></li>
961
962 <li><a href="http://people.skolelinux.org/pere/blog/tags/reprap">reprap (11)</a></li>
963
964 <li><a href="http://people.skolelinux.org/pere/blog/tags/rfid">rfid (2)</a></li>
965
966 <li><a href="http://people.skolelinux.org/pere/blog/tags/robot">robot (9)</a></li>
967
968 <li><a href="http://people.skolelinux.org/pere/blog/tags/rss">rss (1)</a></li>
969
970 <li><a href="http://people.skolelinux.org/pere/blog/tags/ruter">ruter (4)</a></li>
971
972 <li><a href="http://people.skolelinux.org/pere/blog/tags/scraperwiki">scraperwiki (2)</a></li>
973
974 <li><a href="http://people.skolelinux.org/pere/blog/tags/sikkerhet">sikkerhet (33)</a></li>
975
976 <li><a href="http://people.skolelinux.org/pere/blog/tags/sitesummary">sitesummary (4)</a></li>
977
978 <li><a href="http://people.skolelinux.org/pere/blog/tags/skepsis">skepsis (4)</a></li>
979
980 <li><a href="http://people.skolelinux.org/pere/blog/tags/standard">standard (44)</a></li>
981
982 <li><a href="http://people.skolelinux.org/pere/blog/tags/stavekontroll">stavekontroll (3)</a></li>
983
984 <li><a href="http://people.skolelinux.org/pere/blog/tags/stortinget">stortinget (9)</a></li>
985
986 <li><a href="http://people.skolelinux.org/pere/blog/tags/surveillance">surveillance (21)</a></li>
987
988 <li><a href="http://people.skolelinux.org/pere/blog/tags/sysadmin">sysadmin (1)</a></li>
989
990 <li><a href="http://people.skolelinux.org/pere/blog/tags/valg">valg (8)</a></li>
991
992 <li><a href="http://people.skolelinux.org/pere/blog/tags/video">video (39)</a></li>
993
994 <li><a href="http://people.skolelinux.org/pere/blog/tags/vitenskap">vitenskap (4)</a></li>
995
996 <li><a href="http://people.skolelinux.org/pere/blog/tags/web">web (28)</a></li>
997
998 </ul>
999
1000
1001 </div>
1002 <p style="text-align: right">
1003 Created by <a href="http://steve.org.uk/Software/chronicle">Chronicle v4.6</a>
1004 </p>
1005
1006 </body>
1007 </html>