1 <?xml version=
"1.0" encoding=
"ISO-8859-1"?>
2 <rss version='
2.0' xmlns:lj='http://www.livejournal.org/rss/lj/
1.0/'
>
4 <title>Petter Reinholdtsen - Entries from November
2013</title>
5 <description>Entries from November
2013</description>
6 <link>http://www.hungry.com/~pere/blog/
</link>
10 <title>Dugnadsnett for alle, a wireless community network in Oslo, take shape
</title>
11 <link>http://www.hungry.com/~pere/blog/Dugnadsnett_for_alle__a_wireless_community_network_in_Oslo__take_shape.html
</link>
12 <guid isPermaLink=
"true">http://www.hungry.com/~pere/blog/Dugnadsnett_for_alle__a_wireless_community_network_in_Oslo__take_shape.html
</guid>
13 <pubDate>Sat,
30 Nov
2013 10:
10:
00 +
0100</pubDate>
14 <description><p
>If you want the ability to electronically communicate directly with
15 your neighbors and friends using a network controlled by your peers in
16 stead of centrally controlled by a few corporations, or would like to
17 experiment with interesting network technology, the
18 <a href=
"http://www.dugnadsnett.no/
">Dugnasnett for alle i Oslo
</a
>
19 might be project for you.
39 mesh nodes are currently being planned,
20 in the freshly started initiative from NUUG and Hackeriet to create a
21 wireless community network. The work is inspired by
22 <a href=
"http://freifunk.net/
">Freifunk
</a
>,
23 <a href=
"http://www.awmn.net/
">Athens Wireless Metropolitan
24 Network
</a
>,
<a href=
"http://en.wikipedia.org/wiki/Roofnet
">Roofnet
</a
>
25 and other successful mesh networks around the globe. Two days ago we
26 held a workshop to try to get people started on setting up their own
27 mesh node, and there we decided to create a new mailing list
28 <a href=
"http://lists.nuug.no/mailman/listinfo/dugnadsnett
">dugnadsnett
29 (at) nuug.no
</a
> and IRC channel
30 <a href=
"irc://irc.freenode.net/#dugnadsnett.no
">#dugnadsnett.no
</a
> to
31 coordinate the work. See also the NUUG blog post
32 <a href=
"http://www.nuug.no/news/E_postliste_og_IRC_kanal_for_Dugnadsnett_for_alle_i_Oslo.shtml
">announcing
33 the mailing list and IRC channel
</a
>.
</p
>
38 <title>Hvor godt fungerer Linux-klienter mot MS Exchange?
</title>
39 <link>http://www.hungry.com/~pere/blog/Hvor_godt_fungerer_Linux_klienter_mot_MS_Exchange_.html
</link>
40 <guid isPermaLink=
"true">http://www.hungry.com/~pere/blog/Hvor_godt_fungerer_Linux_klienter_mot_MS_Exchange_.html
</guid>
41 <pubDate>Tue,
26 Nov
2013 18:
50:
00 +
0100</pubDate>
42 <description><p
>Jeg
43 <a href=
"http://www.hungry.com/~pere/blog/_pent_m_te_p__onsdag_om_bruken_av_Microsoft_Exchange_ved_Universitetet_i_Oslo.html
">skrev
44 i juni om protestene
</a
> på planene til min arbeidsplass,
45 <a href=
"http://www.uio.no/
">Universitetet i Oslo
</a
>, om å gå bort fra
46 fri programvare- og åpne standardløsninger for å håndtere epost,
47 vekk fra IETF-standarden SIEVE for filtrering av epost og over til
48 godseide spesifikasjoner og epostsystemet Microsoft Exchange.
49 Protestene har fått litt ny omtale i media de siste dagene, i tillegg
50 til de oppslagene som kom i mai.
</p
>
54 <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
>
57 <a href=
"http://www.idg.no/computerworld/article279407.ece
">Microsoft-protest
58 på Universitetet
</a
> - Computerworld
</li
>
61 <a href=
"http://www.uniforum.uio.no/nyheter/
2013/
11/uio-bor-bruke-apen-programvare.html
">Kjemper
62 mot innføring av Microsoft Exchange på UiO
</a
> - Uniforum
</li
>
65 <a href=
"http://www.uniforum.uio.no/nyheter/
2013/
11/uio-utsetter-innforing-av-nytt-e-postsystem.html
">Utsetter
66 innføring av nytt e-postsystem
</a
> - Uniforum
</li
>
69 <a href=
"http://universitas.no/nyhet/
58462/forsvarer-nytt-it-system
">Forsvarer
70 nytt IT-system
</a
> - Universitas
</li
>
73 <a href=
"http://www.uniforum.uio.no/nyheter/
2013/
05/uio-innforer-nytt-epost-og-kalendersystem.html
">UiO
74 innfører nytt epost- og kalenderverktøy
</a
> - Uniforum
</li
>
77 <a href=
"http://universitas.no/nyhet/
58424/protestgruppe-vil-stanse-it-system
">Protestgruppe
78 vil stanse IT-system
</a
> - Universitas
</li
>
81 <a href=
"http://www.uniforum.uio.no/leserbrev/
2013/uio-ma-ha-kontroll-over-sitt-eget-epostsystem.html
">UiO
82 må ha kontroll over sitt eget epostsystem
</a
> - Uniforum
</li
>
86 <p
>Prosjektledelsen har fortalt at dette skal fungere like godt for
87 Linux-brukere som for brukere av Microsoft Windows og Apple MacOSX,
88 men jeg lurer på hva slags erfaringer Linux-brukere i eksisterende
89 miljøer som bruker MS Exchange har gjort. Hvis du har slik erfaring
90 hadet det vært veldig fint om du kan send et leserbrev til
91 <a href=
"http://www.uniforum.uio.no/
">Uniforum
</a
> og fortelle om hvor
92 greit det er å bruke Exchange i kryss-platform-miljøer? De jeg har
93 snakket med sier en greit får lest e-posten sin hvis Exchange har
94 slått på IMAP-funksjonalitet, men at kalender og møtebooking ikke
95 fungerer godt for Linux-klienter. Jeg har ingen personlig erfaring å
96 komme med, så jeg er nysgjerrig på hva andre kan dele av erfaringer
97 med universitetet.
</p
>
99 <p
>Mitt ankerpunkt mot å bytte ut fri programvare som fungerer godt
100 med godseid programvare er at en mister kontroll over egen
101 infrastruktur, låser seg inn i en løsning det vil bli dyrt å komme ut
102 av, uten at en får funksjonalitet en ikke kunne skaffet seg med fri
103 programvare, eventuelt videreutviklet med de pengene som brukes på
104 overgangen til MS Exchange. Personlig planlegger jeg å fortsette å
105 laste ned all eposten min til lokal maskin for indeksering og lesing
106 med
<a href==
"http://notmuchmail.org
">notmuch
</a
>, så jeg håper jeg
107 ikke blir veldig skadelidende av overgangen.
</p
>
109 <p
><a href=
"http://dinis.linguateca.pt/Diana/ImotMSUiO.html
">Underskriftslista
110 for oss som er mot endringen
</a
>, som omtales i artiklene, er fortsatt
111 åpen for de som vil signere på oppropet. Akkurat nå er det
298
112 personer som har signert.
</p
>
117 <title>New chrpath release
0.15</title>
118 <link>http://www.hungry.com/~pere/blog/New_chrpath_release_0_15.html
</link>
119 <guid isPermaLink=
"true">http://www.hungry.com/~pere/blog/New_chrpath_release_0_15.html
</guid>
120 <pubDate>Sun,
24 Nov
2013 09:
30:
00 +
0100</pubDate>
121 <description><p
>After many years break from the package and a vain hope that
122 development would be continued by someone else, I finally pulled my
123 acts together this morning and wrapped up a new release of chrpath,
124 the command line tool to modify the rpath and runpath of already
125 compiled ELF programs. The update was triggered by the persistence of
126 Isha Vishnoi at IBM, which needed a new config.guess file to get
127 support for the ppc64le architecture (powerpc
64-bit Little Endian) he
128 is working on. I checked the
129 <a href=
"http://packages.qa.debian.org/chrpath
">Debian
</a
>,
130 <a href=
"https://launchpad.net/ubuntu/+source/chrpath
">Ubuntu
</a
> and
131 <a href=
"https://admin.fedoraproject.org/pkgdb/acls/name/chrpath
">Fedora
</a
>
132 packages for interesting patches (failed to find the source from
133 OpenSUSE and Mandriva packages), and found quite a few nice fixes.
134 These are the release notes:
</p
>
136 <p
>New in
0.15 released
2013-
11-
24:
</p
>
140 <li
>Updated config.sub and config.guess from the GNU project to work
141 with newer architectures. Thanks to isha vishnoi for the heads
144 <li
>Updated README with current URLs.
</li
>
146 <li
>Added byteswap fix found in Ubuntu, credited Jeremy Kerr and
147 Matthias Klose.
</li
>
149 <li
>Added missing help for -k|--keepgoing option, using patch by
150 Petr Machata found in Fedora.
</li
>
152 <li
>Rewrite removal of RPATH/RUNPATH to make sure the entry in
153 .dynamic is a NULL terminated string. Based on patch found in
154 Fedora credited Axel Thimm and Christian Krause.
</li
>
159 <a href=
"https://alioth.debian.org/frs/?group_id=
31052">download the
160 new version
0.15 from alioth
</a
>. Please let us know via the Alioth
161 project if something is wrong with the new release. The test suite
162 did not discover any old errors, so if you find a new one, please also
163 include a testsuite check.
</p
>
168 <title>RSS-kilde for fritekstsøk i offentlige anbud hos Doffin
</title>
169 <link>http://www.hungry.com/~pere/blog/RSS_kilde_for_friteksts_k_i_offentlige_anbud_hos_Doffin.html
</link>
170 <guid isPermaLink=
"true">http://www.hungry.com/~pere/blog/RSS_kilde_for_friteksts_k_i_offentlige_anbud_hos_Doffin.html
</guid>
171 <pubDate>Fri,
22 Nov
2013 13:
40:
00 +
0100</pubDate>
172 <description><p
>I fjor sommer lagde jeg en
173 <a href=
"http://www.hungry.com/~pere/blog/SQL_database_med_anbud_publisert_p__Doffin.html
">offentlig
174 tilgjengelig SQL-database over offentlig anbud
</a
> basert på skraping
175 av HTML-data fra Doffin. Den har stått og gått siden da, og har nå
176 ca.
28000 oppføringer. Jeg oppdaget da jeg tittet innom at noen
177 oppføringer var ikke blitt med, antagelig på grunn av at de fikk
178 tildelt sekvensnummer i Doffin en godt stund før de ble publisert,
179 slik at min nettsideskraper som fortsatte skrapingen der den slapp
180 sist ikke fikk dem med seg. Jeg har fikset litt slik at skraperen nå
181 ser litt tilbake i tid for å se om den har gått glipp av noen
182 oppføringer, og har skrapet på nytt fra midten av september
2013 og
183 fremover. Det bør dermed bli en mer komplett database for kommende
184 måneder. Hvis jeg får tid skal jeg forsøke å skrape
"glemte
" data fra
185 før midten av september
2013, men tør ikke garantere at det blir
186 prioritert med det første.
</p
>
188 <p
>Men målet med denne bloggposten er å vise hvordan denne
189 Doffin-databasen kan brukes og integreres med en RSS-leser, slik at en
190 kan la datamaskinen holde et øye med Doffin-annonseringer etter
191 nøkkelord. En kan lage sitt eget søk ved å besøke
192 <ahref=
"https://classic.scraperwiki.com/docs/api?name=norwegian-doffin#sqlite
">API-et
193 hos Scraperwiki
</a
>, velge format rss2 og så legge inn noe ala dette i
194 "query in SQL
":
</p
>
197 select title, scrapedurl as link, abstract as description,
198 publishdate as pubDate from
'swdata
'
199 where abstract like
'%linux%
' or title like
'%linux%
'
200 order by seq desc limit
20
201 </pre
></p
>
203 <p
>Dette vil søke opp alle anbud med ordet linux i oppsummering eller
204 tittel. En kan lage mer avanserte søk hvis en ønsker det. URL-en som
205 dukker opp nederst på siden kan en så gi til sin RSS-leser (jeg bruker
206 akregator selv), og så automatisk få beskjed hvis det dukker opp anbud
207 med det aktuelle nøkkelordet i teksten. Merk at kapasiteten og
208 ytelsen hos Scraperwiki er begrenset, så ikke be RSS-leseren hente ned
209 oftere enn en gang hver dag.
</p
>
211 <p
>Du lurer kanskje på hva slags informasjon en kan få ut fra denne
212 databasen. Her er to RSS-kilder, med søkeordet
213 "<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
>",
215 "<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
216 programvare
</a
>"
218 "<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
>".
219 Det er bare å søke på det en er interessert i. Kopier gjerne
220 datasettet og sett opp din egen tjeneste hvis du vil gjøre mer
221 avanserte søk. SQLite-filen med Doffin-oppføringer kan lastes med fra
222 Scraperwiki for de som vil grave dypere.
</p
>
227 <title>All drones should be radio marked with what they do and who they belong to
</title>
228 <link>http://www.hungry.com/~pere/blog/All_drones_should_be_radio_marked_with_what_they_do_and_who_they_belong_to.html
</link>
229 <guid isPermaLink=
"true">http://www.hungry.com/~pere/blog/All_drones_should_be_radio_marked_with_what_they_do_and_who_they_belong_to.html
</guid>
230 <pubDate>Thu,
21 Nov
2013 15:
40:
00 +
0100</pubDate>
231 <description><p
>Drones, flying robots, are getting more and more popular. The most
232 know ones are the killer drones used by some government to murder
233 people they do not like without giving them the chance of a fair
234 trial, but the technology have many good uses too, from mapping and
235 forest maintenance to photography and search and rescue. I am sure it
236 is just a question of time before
"bad drones
" are in the hands of
237 private enterprises and not only state criminals but petty criminals
238 too. The drone technology is very useful and very dangerous. To have
239 some control over the use of drones, I agree with Daniel Suarez in his
241 "<a href=
"https://archive.org/details/DanielSuarez_2013G
">The kill
242 decision shouldn
't belong to a robot
</a
>", where he suggested this
243 little gem to keep the good while limiting the bad use of drones:
</p
>
247 <p
>Each robot and drone should have a cryptographically signed
248 I.D. burned in at the factory that can be used to track its movement
249 through public spaces. We have license plates on cars, tail numbers on
250 aircraft. This is no different. And every citizen should be able to
251 download an app that shows the population of drones and autonomous
252 vehicles moving through public spaces around them, both right now and
253 historically. And civic leaders should deploy sensors and civic drones
254 to detect rogue drones, and instead of sending killer drones of their
255 own up to shoot them down, they should notify humans to their
256 presence. And in certain very high-security areas, perhaps civic
257 drones would snare them and drag them off to a bomb disposal facility.
</p
>
259 <p
>But notice, this is more an immune system than a weapons system. It
260 would allow us to avail ourselves of the use of autonomous vehicles
261 and drones while still preserving our open, civil society.
</p
>
265 <p
>The key is that
<em
>every citizen
</em
> should be able to read the
266 radio beacons sent from the drones in the area, to be able to check
267 both the government and others use of drones. For such control to be
268 effective, everyone must be able to do it. What should such beacon
269 contain? At least formal owner, purpose, contact information and GPS
270 location. Probably also the origin and target position of the current
271 flight. And perhaps some registration number to be able to look up
272 the drone in a central database tracking their movement. Robots
273 should not have privacy. It is people who need privacy.
</p
>
278 <title>Lets make a wireless community network in Oslo!
</title>
279 <link>http://www.hungry.com/~pere/blog/Lets_make_a_wireless_community_network_in_Oslo_.html
</link>
280 <guid isPermaLink=
"true">http://www.hungry.com/~pere/blog/Lets_make_a_wireless_community_network_in_Oslo_.html
</guid>
281 <pubDate>Wed,
13 Nov
2013 21:
00:
00 +
0100</pubDate>
282 <description><p
>Today NUUG and Hackeriet announced
283 <a href=
"http://www.nuug.no/news/Bli_med___bygge_dugnadsnett_for_alle_i_Oslo.shtml
">our
284 plans to join forces and create a wireless community network in
285 Oslo
</a
>. The workshop to help people get started will take place
286 Thursday
2013-
11-
28, but we already are collecting the geolocation of
287 people joining forces to make this happen. We have
288 <a href=
"https://github.com/petterreinholdtsen/meshfx-node/blob/master/oslo-nodes.geojson
">9
289 locations plotted on the map
</a
>, but we will need more before we have
290 a connected mesh spread across Oslo. If this sound interesting to
291 you, please join us at the workshop. If you are too impatient to wait
292 15 days, please join us on the IRC channel
293 <a href=
"irc://irc.freenode.net/%
23nuug
">#nuug on irc.freenode.net
</a
>
294 right away. :)
</p
>
299 <title>Running TP-Link MR3040 as a batman-adv mesh node using openwrt
</title>
300 <link>http://www.hungry.com/~pere/blog/Running_TP_Link_MR3040_as_a_batman_adv_mesh_node_using_openwrt.html
</link>
301 <guid isPermaLink=
"true">http://www.hungry.com/~pere/blog/Running_TP_Link_MR3040_as_a_batman_adv_mesh_node_using_openwrt.html
</guid>
302 <pubDate>Sun,
10 Nov
2013 23:
00:
00 +
0100</pubDate>
303 <description><p
>Continuing my research into mesh networking, I was recommended to
304 use TP-Link
3040 and
3600 access points as mesh nodes, and the pair I
305 bought arrived on Friday. Here are my notes on how to set up the
306 MR3040 as a mesh node using
307 <a href=
"http://www.openwrt.org/
">OpenWrt
</a
>.
</p
>
309 <p
>I started by following the instructions on the OpenWRT wiki for
310 <a href=
"http://wiki.openwrt.org/toh/tp-link/tl-mr3040
">TL-MR3040
</a
>,
312 <a href=
"http://downloads.openwrt.org/snapshots/trunk/ar71xx/openwrt-ar71xx-generic-tl-mr3040-v2-squashfs-factory.bin
">the
313 recommended firmware image
</a
>
314 (openwrt-ar71xx-generic-tl-mr3040-v2-squashfs-factory.bin) and
315 uploaded it into the original web interface. The flashing went fine,
316 and the machine was available via telnet on the ethernet port. After
317 logging in and setting the root password, ssh was available and I
318 could start to set it up as a batman-adv mesh node.
</p
>
320 <p
>I started off by reading the instructions from
321 <a href=
"http://wirelessafrica.meraka.org.za/wiki/index.php?title=Antoine
's_Research
">Wireless
322 Africa
</a
>, which had quite a lot of useful information, but
323 eventually I followed the recipe from the Open Mesh wiki for
324 <a href=
"http://www.open-mesh.org/projects/batman-adv/wiki/Batman-adv-openwrt-config
">using
325 batman-adv on OpenWrt
</a
>. A small snag was the fact that the
326 <tt
>opkg install kmod-batman-adv
</tt
> command did not work as it
327 should. The batman-adv kernel module would fail to load because its
328 dependency crc16 was not already loaded. I
329 <a href=
"https://dev.openwrt.org/ticket/
14452">reported the bug
</a
> to
330 the openwrt project and hope it will be fixed soon. But the problem
331 only seem to affect initial testing of batman-adv, as configuration
332 seem to work when booting from scratch.
</p
>
334 <p
>The setup is done using files in /etc/config/. I did not bridge
335 the Ethernet and mesh interfaces this time, to be able to hook up the
336 box on my local network and log into it for configuration updates.
337 The following files were changed and look like this after modifying
340 <p
><tt
>/etc/config/network
</tt
></p
>
344 config interface
'loopback
'
345 option ifname
'lo
'
346 option proto
'static
'
347 option ipaddr
'127.0.0.1'
348 option netmask
'255.0.0.0'
350 config globals
'globals
'
351 option ula_prefix
'fdbf:
4c12:
3fed::/
48'
353 config interface
'lan
'
354 option ifname
'eth0
'
355 option type
'bridge
'
356 option proto
'dhcp
'
357 option ipaddr
'192.168.1.1'
358 option netmask
'255.255.255.0'
359 option hostname
'tl-mr3040
'
360 option ip6assign
'60'
362 config interface
'mesh
'
363 option ifname
'adhoc0
'
364 option mtu
'1528'
365 option proto
'batadv
'
366 option mesh
'bat0
'
369 <p
><tt
>/etc/config/wireless
</tt
></p
>
372 config wifi-device
'radio0
'
373 option type
'mac80211
'
374 option channel
'11'
375 option hwmode
'11ng
'
376 option path
'platform/ar933x_wmac
'
377 option htmode
'HT20
'
378 list ht_capab
'SHORT-GI-
20'
379 list ht_capab
'SHORT-GI-
40'
380 list ht_capab
'RX-STBC1
'
381 list ht_capab
'DSSS_CCK-
40'
382 option disabled
'0'
384 config wifi-iface
'wmesh
'
385 option device
'radio0
'
386 option ifname
'adhoc0
'
387 option network
'mesh
'
388 option encryption
'none
'
389 option mode
'adhoc
'
390 option bssid
'02:BA:
00:
00:
00:
01'
391 option ssid
'meshfx@hackeriet
'
393 <p
><tt
>/etc/config/batman-adv
</tt
></p
>
396 config
'mesh
' 'bat0
'
397 option interfaces
'adhoc0
'
398 option
'aggregated_ogms
'
399 option
'ap_isolation
'
400 option
'bonding
'
401 option
'fragmentation
'
402 option
'gw_bandwidth
'
403 option
'gw_mode
'
404 option
'gw_sel_class
'
405 option
'log_level
'
406 option
'orig_interval
'
407 option
'vis_mode
'
408 option
'bridge_loop_avoidance
'
409 option
'distributed_arp_table
'
410 option
'network_coding
'
411 option
'hop_penalty
'
413 # yet another batX instance
414 # config
'mesh
' 'bat5
'
415 # option
'interfaces
' 'second_mesh
'
418 <p
>The mesh node is now operational. I have yet to test its range,
419 but I hope it is good. I have not yet tested the TP-Link
3600 box
420 still wrapped up in plastic.
</p
>
425 <title>Debian init.d boot script example for rsyslog
</title>
426 <link>http://www.hungry.com/~pere/blog/Debian_init_d_boot_script_example_for_rsyslog.html
</link>
427 <guid isPermaLink=
"true">http://www.hungry.com/~pere/blog/Debian_init_d_boot_script_example_for_rsyslog.html
</guid>
428 <pubDate>Sat,
2 Nov
2013 22:
40:
00 +
0100</pubDate>
429 <description><p
>If one of the points of switching to a new init system in Debian is
430 <a href=
"http://thomas.goirand.fr/blog/?p=
147">to get rid of huge
431 init.d scripts
</a
>, I doubt we need to switch away from sysvinit and
432 init.d scripts at all. Here is an example init.d script, ie a rewrite
433 of /etc/init.d/rsyslog:
</p
>
436 #!/lib/init/init-d-script
439 # Required-Start: $remote_fs $time
440 # Required-Stop: umountnfs $time
441 # X-Stop-After: sendsigs
442 # Default-Start:
2 3 4 5
443 # Default-Stop:
0 1 6
444 # Short-Description: enhanced syslogd
445 # Description: Rsyslog is an enhanced multi-threaded syslogd.
446 # It is quite compatible to stock sysklogd and can be
447 # used as a drop-in replacement.
449 DESC=
"enhanced syslogd
"
450 DAEMON=/usr/sbin/rsyslogd
451 </pre
></p
>
453 <p
>Pretty minimalistic to me... For the record, the original sysv-rc
454 script was
137 lines, and the above is just
15 lines, most of it meta
455 info/comments.
</p
>
457 <p
>How to do this, you ask? Well, one create a new script
458 /lib/init/init-d-script looking something like this:
463 # Define LSB log_* functions.
464 # Depend on lsb-base (
>=
3.2-
14) to ensure that this file is present
465 # and status_of_proc is working.
466 . /lib/lsb/init-functions
469 # Function that starts the daemon/service
475 #
0 if daemon has been started
476 #
1 if daemon was already running
477 #
2 if daemon could not be started
478 start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test
> /dev/null \
480 start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
483 # Add code here, if necessary, that waits for the process to be ready
484 # to handle requests from services started subsequently which depend
485 # on this one. As a last resort, sleep for some time.
489 # Function that stops the daemon/service
494 #
0 if daemon has been stopped
495 #
1 if daemon was already stopped
496 #
2 if daemon could not be stopped
497 # other if a failure occurred
498 start-stop-daemon --stop --quiet --retry=TERM/
30/KILL/
5 --pidfile $PIDFILE --name $NAME
499 RETVAL=
"$?
"
500 [
"$RETVAL
" =
2 ]
&& return
2
501 # Wait for children to finish too if this is a daemon that forks
502 # and if the daemon is only ever run from this initscript.
503 # If the above conditions are not satisfied then add some other code
504 # that waits for the process to drop all resources that could be
505 # needed by services started subsequently. A last resort is to
506 # sleep for some time.
507 start-stop-daemon --stop --quiet --oknodo --retry=
0/
30/KILL/
5 --exec $DAEMON
508 [
"$?
" =
2 ]
&& return
2
509 # Many daemons don
't delete their pidfiles when they exit.
511 return
"$RETVAL
"
515 # Function that sends a SIGHUP to the daemon/service
519 # If the daemon can reload its configuration without
520 # restarting (for example, when it is sent a SIGHUP),
521 # then implement that here.
523 start-stop-daemon --stop --signal
1 --quiet --pidfile $PIDFILE --name $NAME
528 scriptbasename=
"$(basename $
1)
"
529 echo
"SN: $scriptbasename
"
530 if [
"$scriptbasename
" !=
"init-d-library
" ] ; then
531 script=
"$
1"
538 NAME=$(basename $DAEMON)
539 PIDFILE=/var/run/$NAME.pid
541 # Exit if the package is not installed
542 #[ -x
"$DAEMON
" ] || exit
0
544 # Read configuration variable file if it is present
545 [ -r /etc/default/$NAME ]
&& . /etc/default/$NAME
547 # Load the VERBOSE setting and other rcS variables
550 case
"$
1" in
552 [
"$VERBOSE
" != no ]
&& log_daemon_msg
"Starting $DESC
" "$NAME
"
554 case
"$?
" in
555 0|
1) [
"$VERBOSE
" != no ]
&& log_end_msg
0 ;;
556 2) [
"$VERBOSE
" != no ]
&& log_end_msg
1 ;;
560 [
"$VERBOSE
" != no ]
&& log_daemon_msg
"Stopping $DESC
" "$NAME
"
562 case
"$?
" in
563 0|
1) [
"$VERBOSE
" != no ]
&& log_end_msg
0 ;;
564 2) [
"$VERBOSE
" != no ]
&& log_end_msg
1 ;;
568 status_of_proc
"$DAEMON
" "$NAME
" && exit
0 || exit $?
570 #reload|force-reload)
572 # If do_reload() is not implemented then leave this commented out
573 # and leave
'force-reload
' as an alias for
'restart
'.
575 #log_daemon_msg
"Reloading $DESC
" "$NAME
"
579 restart|force-reload)
581 # If the
"reload
" option is implemented then remove the
582 #
'force-reload
' alias
584 log_daemon_msg
"Restarting $DESC
" "$NAME
"
586 case
"$?
" in
589 case
"$?
" in
591 1) log_end_msg
1 ;; # Old process is still running
592 *) log_end_msg
1 ;; # Failed to start
602 echo
"Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}
" >&2
608 </pre
></p
>
610 <p
>It is based on /etc/init.d/skeleton, and could be improved quite a
611 lot. I did not really polish the approach, so it might not always
612 work out of the box, but you get the idea. I did not try very hard to
613 optimize it nor make it more robust either.
</p
>
615 <p
>A better argument for switching init system in Debian than reducing
616 the size of init scripts (which is a good thing to do anyway), is to
617 get boot system that is able to handle the kernel events sensibly and
618 robustly, and do not depend on the boot to run sequentially. The boot
619 and the kernel have not behaved sequentially in years.
</p
>
624 <title>Browser plugin for SPICE (spice-xpi) uploaded to Debian
</title>
625 <link>http://www.hungry.com/~pere/blog/Browser_plugin_for_SPICE__spice_xpi__uploaded_to_Debian.html
</link>
626 <guid isPermaLink=
"true">http://www.hungry.com/~pere/blog/Browser_plugin_for_SPICE__spice_xpi__uploaded_to_Debian.html
</guid>
627 <pubDate>Fri,
1 Nov
2013 11:
00:
00 +
0100</pubDate>
628 <description><p
><a href=
"http://www.spice-space.org/
">The SPICE protocol
</a
> for
629 remote display access is the preferred solution with oVirt and RedHat
630 Enterprise Virtualization, and I was sad to discover the other day
631 that the browser plugin needed to use these systems seamlessly was
632 missing in Debian. The
<a href=
"http://bugs.debian.org/
668284">request
633 for a package
</a
> was from
2012-
04-
10 with no progress since
634 2013-
04-
01, so I decided to wrap up a package based on the great work
635 from Cajus Pollmeier and put it in a collab-maint maintained git
636 repository to get a package I could use. I would very much like
637 others to help me maintain the package (or just take over, I do not
638 mind), but as no-one had volunteered so far, I just uploaded it to
639 NEW. I hope it will be available in Debian in a few days.
</p
>
641 <p
>The source is now available from
642 <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
>