X-Git-Url: http://pere.pagekite.me/gitweb/homepage.git/blobdiff_plain/e8aade9fc124dbd020313b34cb60f34b9059e48f..b8cfdc4c79eda32eae7d84374df6c3660e65f93a:/blog/index.rss diff --git a/blog/index.rss b/blog/index.rss index e6eaa49ac0..60979bb258 100644 --- a/blog/index.rss +++ b/blog/index.rss @@ -6,6 +6,459 @@ http://people.skolelinux.org/pere/blog/ + + Testing sysvinit from experimental in Debian Hurd + http://people.skolelinux.org/pere/blog/Testing_sysvinit_from_experimental_in_Debian_Hurd.html + http://people.skolelinux.org/pere/blog/Testing_sysvinit_from_experimental_in_Debian_Hurd.html + Mon, 3 Feb 2014 13:40:00 +0100 + <p>A few days ago I decided to try to help the Hurd people to get +their changes into sysvinit, to allow them to use the normal sysvinit +boot system instead of their old one. This follow up on the +<a href="https://teythoon.cryptobitch.de//categories/gsoc.html">great +Google Summer of Code work</a> done last summer by Justus Winter to +get Debian on Hurd working more like Debian on Linux. To get started, +I downloaded a prebuilt hard disk image from +<a href="http://ftp.debian-ports.org/debian-cd/hurd-i386/current/debian-hurd.img.tar.gz">http://ftp.debian-ports.org/debian-cd/hurd-i386/current/debian-hurd.img.tar.gz</a>, +and started it using virt-manager.</p> + +<p>The first think I had to do after logging in (root without any +password) was to get the network operational. I followed +<a href="https://www.debian.org/ports/hurd/hurd-install">the +instructions on the Debian GNU/Hurd ports page</a> and ran these +commands as root to get the machine to accept a IP address from the +kvm internal DHCP server:</p> + +<p><blockquote><pre> +settrans -fgap /dev/netdde /hurd/netdde +pkill pfinet +pkill devnode +dhclient -v /dev/eth0 +</pre></blockquote></p> + +<p>After this, the machine had internet connectivity, and I could +upgrade it and install the sysvinit packages from experimental and +enable it as the default boot system in Hurd.</p> + +<p>But before I did that, I set a password on the root user, as ssh is +running on the machine it for ssh login to work a password need to be +set. Also, note that a bug somewhere in openssh on Hurd block +compression from working. Remember to turn that off on the client +side.</p> + +<p>Run these commands as root to upgrade and test the new sysvinit +stuff:</p> + +<p><blockquote><pre> +cat > /etc/apt/sources.list.d/experimental.list &lt;&lt;EOF +deb http://http.debian.net/debian/ experimental main +EOF +apt-get update +apt-get dist-upgrade +apt-get install -t experimental initscripts sysv-rc sysvinit \ + sysvinit-core sysvinit-utils +update-alternatives --config runsystem +</pre></blockquote></p> + +<p>To reboot after switching boot system, you have to use +<tt>reboot-hurd</tt> instead of just <tt>reboot</tt>, as there is not +yet a sysvinit process able to receive the signals from the normal +'reboot' command. After switching to sysvinit as the boot system, +upgrading every package and rebooting, the network come up with DHCP +after boot as it should, and the settrans/pkill hack mentioned at the +start is no longer needed. But for some strange reason, there are no +longer any login prompt in the virtual console, so I logged in using +ssh instead. + +<p>Note that there are some race conditions in Hurd making the boot +fail some times. No idea what the cause is, but hope the Hurd porters +figure it out. At least Justus said on IRC (#debian-hurd on +irc.debian.org) that they are aware of the problem. A way to reduce +the impact is to upgrade to the Hurd packages built by Justus by +adding this repository to the machine:</p> + +<p><blockquote><pre> +cat > /etc/apt/sources.list.d/hurd-ci.list &lt;&lt;EOF +deb http://darnassus.sceen.net/~teythoon/hurd-ci/ sid main +EOF +</pre></blockquote></p> + +<p>At the moment the prebuilt virtual machine get some packages from +http://ftp.debian-ports.org/debian, because some of the packages in +unstable do not yet include the required patches that are lingering in +BTS. This is the completely list of "unofficial" packages installed:</p> + +<p><blockquote><pre> +# aptitude search '?narrow(?version(CURRENT),?origin(Debian Ports))' +i emacs - GNU Emacs editor (metapackage) +i gdb - GNU Debugger +i hurd-recommended - Miscellaneous translators +i isc-dhcp-client - ISC DHCP client +i isc-dhcp-common - common files used by all the isc-dhcp* packages +i libc-bin - Embedded GNU C Library: Binaries +i libc-dev-bin - Embedded GNU C Library: Development binaries +i libc0.3 - Embedded GNU C Library: Shared libraries +i A libc0.3-dbg - Embedded GNU C Library: detached debugging symbols +i libc0.3-dev - Embedded GNU C Library: Development Libraries and Hea +i multiarch-support - Transitional package to ensure multiarch compatibilit +i A x11-common - X Window System (X.Org) infrastructure +i xorg - X.Org X Window System +i A xserver-xorg - X.Org X server +i A xserver-xorg-input-all - X.Org X server -- input driver metapackage +# +</pre></blockquote></p> + +<p>All in all, testing hurd has been an interesting experience. :) +X.org did not work out of the box and I never took the time to follow +the porters instructions to fix it. This time I was interested in the +command line stuff.<p> + + + + + A fist full of non-anonymous Bitcoins + http://people.skolelinux.org/pere/blog/A_fist_full_of_non_anonymous_Bitcoins.html + http://people.skolelinux.org/pere/blog/A_fist_full_of_non_anonymous_Bitcoins.html + Wed, 29 Jan 2014 14:10:00 +0100 + <p>Bitcoin is a incredible use of peer to peer communication and +encryption, allowing direct and immediate money transfer without any +central control. It is sometimes claimed to be ideal for illegal +activity, which I believe is quite a long way from the truth. At least +I would not conduct illegal money transfers using a system where the +details of every transaction are kept forever. This point is +investigated in +<a href="https://www.usenix.org/publications/login">USENIX ;login:</a> +from December 2013, in the article +"<a href="https://www.usenix.org/system/files/login/articles/03_meiklejohn-online.pdf">A +Fistful of Bitcoins - Characterizing Payments Among Men with No +Names</a>" by Sarah Meiklejohn, Marjori Pomarole,Grant Jordan, Kirill +Levchenko, Damon McCoy, Geoffrey M. Voelker, and Stefan Savage. They +analyse the transaction log in the Bitcoin system, using it to find +addresses belong to individuals and organisations and follow the flow +of money from both Bitcoin theft and trades on Silk Road to where the +money end up. This is how they wrap up their article:</p> + +<p><blockquote> +<p>"To demonstrate the usefulness of this type of analysis, we turned +our attention to criminal activity. In the Bitcoin economy, criminal +activity can appear in a number of forms, such as dealing drugs on +Silk Road or simply stealing someone else’s bitcoins. We followed the +flow of bitcoins out of Silk Road (in particular, from one notorious +address) and from a number of highly publicized thefts to see whether +we could track the bitcoins to known services. Although some of the +thieves attempted to use sophisticated mixing techniques (or possibly +mix services) to obscure the flow of bitcoins, for the most part +tracking the bitcoins was quite straightforward, and we ultimately saw +large quantities of bitcoins flow to a variety of exchanges directly +from the point of theft (or the withdrawal from Silk Road).</p> + +<p>As acknowledged above, following stolen bitcoins to the point at +which they are deposited into an exchange does not in itself identify +the thief; however, it does enable further de-anonymization in the +case in which certain agencies can determine (through, for example, +subpoena power) the real-world owner of the account into which the +stolen bitcoins were deposited. Because such exchanges seem to serve +as chokepoints into and out of the Bitcoin economy (i.e., there are +few alternative ways to cash out), we conclude that using Bitcoin for +money laundering or other illicit purposes does not (at least at +present) seem to be particularly attractive."</p> +</blockquote><p> + +<p>These researches are not the first to analyse the Bitcoin +transaction log. The 2011 paper +"<a href="http://arxiv.org/abs/1107.4524">An Analysis of Anonymity in +the Bitcoin System</A>" by Fergal Reid and Martin Harrigan is +summarized like this:</p> + +<p><blockquote> +"Anonymity in Bitcoin, a peer-to-peer electronic currency system, is a +complicated issue. Within the system, users are identified by +public-keys only. An attacker wishing to de-anonymize its users will +attempt to construct the one-to-many mapping between users and +public-keys and associate information external to the system with the +users. Bitcoin tries to prevent this attack by storing the mapping of +a user to his or her public-keys on that user's node only and by +allowing each user to generate as many public-keys as required. In +this chapter we consider the topological structure of two networks +derived from Bitcoin's public transaction history. We show that the +two networks have a non-trivial topological structure, provide +complementary views of the Bitcoin system and have implications for +anonymity. We combine these structures with external information and +techniques such as context discovery and flow analysis to investigate +an alleged theft of Bitcoins, which, at the time of the theft, had a +market value of approximately half a million U.S. dollars." +</blockquote></p> + +<p>I hope these references can help kill the urban myth that Bitcoin +is anonymous. It isn't really a good fit for illegal activites. Use +cash if you need to stay anonymous, at least until regular DNA +sampling of notes and coins become the norm. :)</p> + +<p>As usual, if you use Bitcoin and want to show your support of my +activities, please send Bitcoin donations to my address +<b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&label=PetterReinholdtsenBlog">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p> + + + + + New chrpath release 0.16 + http://people.skolelinux.org/pere/blog/New_chrpath_release_0_16.html + http://people.skolelinux.org/pere/blog/New_chrpath_release_0_16.html + Tue, 14 Jan 2014 11:00:00 +0100 + <p><a href="http://www.coverity.com/">Coverity</a> is a nice tool to +find problems in C, C++ and Java code using static source code +analysis. It can detect a lot of different problems, and is very +useful to find memory and locking bugs in the error handling part of +the source. The company behind it provide +<a href="https://scan.coverity.com/">check of free software projects as +a community service</a>, and many hundred free software projects are +already checked. A few days ago I decided to have a closer look at +the Coverity system, and discovered that the +<a href="http://www.gnu.org/software/gnash/">gnash</a> and +<a href="http://sourceforge.net/projects/ipmitool/">ipmitool</a> +projects I am involved with was already registered. But these are +fairly big, and I would also like to have a small and easy project to +check, and decided to <a href="http://scan.coverity.com/projects/1179">request +checking of the chrpath project</a>. It was +added to the checker and discovered seven potential defects. Six of +these were real, mostly resource "leak" when the program detected an +error. Nothing serious, as the resources would be released a fraction +of a second later when the program exited because of the error, but it +is nice to do it right in case the source of the program some time in +the future end up in a library. Having fixed all defects and added +<a href="https://lists.alioth.debian.org/mailman/listinfo/chrpath-devel">a +mailing list for the chrpath developers</a>, I decided it was time to +publish a new release. These are the release notes:</p> + +<p>New in 0.16 released 2014-01-14:</p> + +<ul> + + <li>Fixed all minor bugs discovered by Coverity.</li> + <li>Updated config.sub and config.guess from the GNU project.</li> + <li>Mention new project mailing list in the documentation.</li> + +</ul> + +<p>You can +<a href="https://alioth.debian.org/frs/?group_id=31052">download the +new version 0.16 from alioth</a>. Please let us know via the Alioth +project if something is wrong with the new release. The test suite +did not discover any old errors, so if you find a new one, please also +include a test suite check.</p> + + + + + Debian Edu interview: Dominik George + http://people.skolelinux.org/pere/blog/Debian_Edu_interview__Dominik_George.html + http://people.skolelinux.org/pere/blog/Debian_Edu_interview__Dominik_George.html + Wed, 25 Dec 2013 13:40:00 +0100 + <p>The <a href="http://www.skolelinux.org/">Debian Edu / Skolelinux +project</a> consist of both newcomers and old timers, and this time I +was able to get an interview with a newcomer in the project who showed +up on the IRC channel a few weeks ago to let us know about his +successful installation of Debian Edu Wheezy in his School. Say hello +to <a href="https://www.ohloh.net/accounts/Natureshadow">Dominik +George</a>.</p> + +<!-- http://www.dominik-george.de/images/foto.jpg --> + +<p><strong>Who are you, and how do you spend your days?</strong></p> + +<p>I am a 23 year-old student from Germany who has spent half of his +life with open source. In "real life", I am, as already mentioned, a +student in the fields of Computer Science, Electrical Engineering, +Information Technologies and Anglistics. Due to my (only partially +voluntary) huge engagement in the open source world, these things are +a bit vacant right now however.</p> + +<p>I also have been working as a project teacher at a Gymasnium +(public school) for various years now. I took up that work some time +around 2005 when still attending that school myself and have continued +it until today. I also had been running the (kind of very advanced) +network of that school together with a team of very interested and +talented students in the age of 11 to 15 years, who took the chance to +learn a lot about open source and networking before I left the school +to help building another school's informational education concept from +scratch.</p> + +<p>That said, one might see me as a kind of "glue" between school kids +and the elderly of teachers as well as between the open source +ecosystem and the (even more complex) educational ecosystem.</p> + +<p>When I am not busy with open source or education, I like Geocaching +and cycling.</p> + +<p><strong>How did you get in contact with the Skolelinux / Debian Edu +project?</strong></p> + +<p>I think that happened some time around 2009 when I first attended +<a href="http://www.froscon.org">FrOSCon</a> and visited the project +booth. I think I wasn't too interested back then because I used to +have an attitude of disliking software that does too much stuff on its +own. Maybe I was too inexperienced to realise the upsides of an +"out-of-the-box" solution ;).</p> + +<p>The first time I actively talked to Skolelinux people was at +<a href="http://www.openrheinruhr.de">OpenRheinRuhr</a> 2011 when the +BiscuIT project, a home-grewn software used by my school for various +really cool things from timetables and class contact lists to lunch +ordering, student ID card printing and project elections first got to +a stage where it could have been published. I asked the Skolelinux +guys running the booth if the project were interested in it and gave a +small demonstration, but there wasn't any real feedback and the guys +seemed rather uninterested.</p> + +<p>After I left the school where I developed the software, it got +mostly lost, but I am now reimplementing it for my new school. I have +reusability and compatibility in mind, and I hop there will be a new +basis for contributing it to the Skolelinux project ;)!</p> + +<p><strong>What do you see as the advantages of Skolelinux / Debian +Edu?</strong></p> + +<p>The most important advantage seems to be that it "just +works". After overcoming some minor (but still very annoying) glitches +in the installer, I got a fully functional, working school network, +without the month-long hassle I experienced when setting all that up +from scratch in earlier years. And above that, it rocked - I didn't +have any real hardware at hand, because the school was just founded +and has no money whatsoever, so I installed a combined server (main +server, terminal services and workstation) in a VM on my personal +notebook, bridging the LTSP network interface to the ethernet port, +and then PXE-booted the Windows notebooks that were lying around from +it. I could use 8 clients without any performance issues, by using a +tiny little VM on a tiny little notebook. I think that's enough to say +that it rocks!</p> + +<p>Secondly, there are marketing reasons. Life's bad, and so no +politician will ever permit a setup described as "Debian, an universal +operating system, with some really cool educational tools" while they +will be jsut fine with "Skolelinux, a single-purpose solution for your +school network", even if both turn out to be the very same thing (yes, +this is unfair towards the Skolelinux project, and must not be taken +too seriously - you get the idea, anyway).</p> + +<p><strong>What do you see as the disadvantages of Skolelinux / Debian +Edu?</strong></p> + +<p>I have not been involved with Skolelinux long enough to really +answer this question in a fair way. Thus, please allow me to put it in +other words: "What do you expect from Skolelinux to keep liking it?" I +can list a few points about that:</p> + +<ul> + + <li>always strive to get all things integrated into Debian upstream + <li>be open to discussion about changes and the like, even with newcomers + <li>be helpful at being helpful ;) + +</ul> + +<p>I'm really sorry I cannot say much more about that :(!</p> + +<p><strong>Which free software do you use daily?</strong></p> + +<p>First of all, all software I use is free and open. I have abandoned +all non-free software (except for firmware on my darned phone) this +year.</p> + +<p>I run Debian GNU/Linux on all PC systems I use. On that, I mostly +run text tools. I use +<a href="https://www.mirbsd.org/mksh.htm">mksh</a> as shell, +<a href="https://www.mirbsd.org/jupp.htm">jupp</a> as very advanced +text editor (I even got the developer to help me write a script/macro +based full-featured student management software with the two), +<a href="http://mcabber.com/">mcabber</a> for XMPP and +<a href="http://www.irssi.org/">irssi</a> for IRC. For that overly +coloured world called the WWW, I use +<a href="https://www.mozilla.org/en-US/firefox/new/">Iceweasel +(Firefox)</a>. Oh, and <a href="http://www.mutt.org/">mutt</a> for +e-mail.</p> + +<p>However, while I am personally aware of the fact that text tools +are more efficient and powerful than anything else, I also use (or at +least operate) some tools that are suitable to bring open source to +kids. One of these things is <a href="http://jappix.org/">Jappix</a>, +which I already introduced to some kids even before they got aware of +Facebook, making them see for themselves that they do not need +Facebook now ;).</p> + +<p><strong>Which strategy do you believe is the right one to use to +get schools to use free software?</strong></p> + +<p>Well, that's a two-sided thing. One side is what I believe, and one +side is what I have experienced.</p> + +<p>I believe that the right strategy is showing them the benefits. But +that won't work out as long as the acceptance of free alternatives +grows globally. What I mean is that if all the kids are almost forced +to use Windows, Facebook, Skype, you name it at home, they will not +see why they would want to use alternatives at school. I have seen +students take seat in front of a fully-functional, modern Debian +desktop that could do anything their Windows at home could do, and +they jsut refused to use it because "Linux sucks". It is something +that makes the council of our city spend around 600000 € to buy +software - not including hardware, mind you - for operating school +networks, and for installing a system that, as has been proved, does +not work. For those of you readers who are good at maths, have you +already found out how many lives could have been saved with that money +if we had instead used it to bring education to parts of the world +that need it? I have, and found it to be nothing less dramatic than +plain criminal.</p> + +<p>That said, the only feasible way appears to be the bottom up +method. We have to bring free software to kids and parents. I have +founded an association named +<a href="https://www.teckids.org">Teckids</a> here in Germany that does +just that. We organise several events for kids and adolescents in the +area of free and open source software, for example the +<a href="http://kids.froscon.org">FrogLabs</a>, which share staff with +Teckids and are the youth programme of +<a href="http://www.froscon.org">the Free and Open Source Software +Conference (FrOSCon)</a>. We do a lot more than most other conferences +- this year, we first offered the FrogLabs as a holiday camp for kids +aged 10 to 16. It was a huge success, with approx. 30 kids taking part +and learning with and about free software through a whole weekend. All +of us had a lot of fun, and the results were really exciting.</p> + +<p>Apart from that, we are preparing a campaign that is supposed to bring +the message of free alternatives to stuff kids use every day to them and +their parents, e.g. the use of Jabber / Jappix instead of Facebook and +Skype. To make that possible, we are planning to get together a team of +clever kids who understand very well what their peers need and can bring +it across to them. So we will have a peer-driven network of adolescents +who teach each other and collect feedback from the community of minors. +We then take that feedback and our own experience to work closely with +open source projects, such as Skolelinux or Jappix, at improving their +software in a way that makes it more and more attractive for the target +group. At least I hope that we will have good cooperation with +Skolelinux in the future ;)!</p> + +<p>So in conclusion, what I believe is that, if it weren't for the world +being so bad, it should be very clear to the political decision makers +that the only way to go nowadays is free software for various reasons, +but I have learnt that the only way that seems to work is bottom up.</p> + +<!-- + +> * Who should be interviewed with this questions in the future? + +That's probably the hardest question of them all, as I do not know the +community. However, I would be willing to do the following: + + <li>Run an interview with a German headteacher who is very open to + free software, and also prefers it, but cannot really use it because + of the decision makers above; + <li>Run interviews with some kids, both with and without previous + knowledge about free software + +If that is wanted, just let me know ;). + +--> + + + Dugnadsnett for alle stiller på Oslo Maker Faire i januar 2014 http://people.skolelinux.org/pere/blog/Dugnadsnett_for_alle_stiller_p__Oslo_Maker_Faire_i_januar_2014.html @@ -386,402 +839,5 @@ Scraperwiki for de som vil grave dypere.</p> - - All drones should be radio marked with what they do and who they belong to - http://people.skolelinux.org/pere/blog/All_drones_should_be_radio_marked_with_what_they_do_and_who_they_belong_to.html - http://people.skolelinux.org/pere/blog/All_drones_should_be_radio_marked_with_what_they_do_and_who_they_belong_to.html - Thu, 21 Nov 2013 15:40:00 +0100 - <p>Drones, flying robots, are getting more and more popular. The most -know ones are the killer drones used by some government to murder -people they do not like without giving them the chance of a fair -trial, but the technology have many good uses too, from mapping and -forest maintenance to photography and search and rescue. I am sure it -is just a question of time before "bad drones" are in the hands of -private enterprises and not only state criminals but petty criminals -too. The drone technology is very useful and very dangerous. To have -some control over the use of drones, I agree with Daniel Suarez in his -TED talk -"<a href="https://archive.org/details/DanielSuarez_2013G">The kill -decision shouldn't belong to a robot</a>", where he suggested this -little gem to keep the good while limiting the bad use of drones:</p> - -<blockquote> - -<p>Each robot and drone should have a cryptographically signed -I.D. burned in at the factory that can be used to track its movement -through public spaces. We have license plates on cars, tail numbers on -aircraft. This is no different. And every citizen should be able to -download an app that shows the population of drones and autonomous -vehicles moving through public spaces around them, both right now and -historically. And civic leaders should deploy sensors and civic drones -to detect rogue drones, and instead of sending killer drones of their -own up to shoot them down, they should notify humans to their -presence. And in certain very high-security areas, perhaps civic -drones would snare them and drag them off to a bomb disposal facility.</p> - -<p>But notice, this is more an immune system than a weapons system. It -would allow us to avail ourselves of the use of autonomous vehicles -and drones while still preserving our open, civil society.</p> - -</blockquote> - -<p>The key is that <em>every citizen</em> should be able to read the -radio beacons sent from the drones in the area, to be able to check -both the government and others use of drones. For such control to be -effective, everyone must be able to do it. What should such beacon -contain? At least formal owner, purpose, contact information and GPS -location. Probably also the origin and target position of the current -flight. And perhaps some registration number to be able to look up -the drone in a central database tracking their movement. Robots -should not have privacy. It is people who need privacy.</p> - - - - - Lets make a wireless community network in Oslo! - http://people.skolelinux.org/pere/blog/Lets_make_a_wireless_community_network_in_Oslo_.html - http://people.skolelinux.org/pere/blog/Lets_make_a_wireless_community_network_in_Oslo_.html - Wed, 13 Nov 2013 21:00:00 +0100 - <p>Today NUUG and Hackeriet announced -<a href="http://www.nuug.no/news/Bli_med___bygge_dugnadsnett_for_alle_i_Oslo.shtml">our -plans to join forces and create a wireless community network in -Oslo</a>. The workshop to help people get started will take place -Thursday 2013-11-28, but we already are collecting the geolocation of -people joining forces to make this happen. We have -<a href="https://github.com/petterreinholdtsen/meshfx-node/blob/master/oslo-nodes.geojson">9 -locations plotted on the map</a>, but we will need more before we have -a connected mesh spread across Oslo. If this sound interesting to -you, please join us at the workshop. If you are too impatient to wait -15 days, please join us on the IRC channel -<a href="irc://irc.freenode.net/%23nuug">#nuug on irc.freenode.net</a> -right away. :)</p> - - - - - Running TP-Link MR3040 as a batman-adv mesh node using openwrt - http://people.skolelinux.org/pere/blog/Running_TP_Link_MR3040_as_a_batman_adv_mesh_node_using_openwrt.html - http://people.skolelinux.org/pere/blog/Running_TP_Link_MR3040_as_a_batman_adv_mesh_node_using_openwrt.html - Sun, 10 Nov 2013 23:00:00 +0100 - <p>Continuing my research into mesh networking, I was recommended to -use TP-Link 3040 and 3600 access points as mesh nodes, and the pair I -bought arrived on Friday. Here are my notes on how to set up the -MR3040 as a mesh node using -<a href="http://www.openwrt.org/">OpenWrt</a>.</p> - -<p>I started by following the instructions on the OpenWRT wiki for -<a href="http://wiki.openwrt.org/toh/tp-link/tl-mr3040">TL-MR3040</a>, -and downloaded -<a href="http://downloads.openwrt.org/snapshots/trunk/ar71xx/openwrt-ar71xx-generic-tl-mr3040-v2-squashfs-factory.bin">the -recommended firmware image</a> -(openwrt-ar71xx-generic-tl-mr3040-v2-squashfs-factory.bin) and -uploaded it into the original web interface. The flashing went fine, -and the machine was available via telnet on the ethernet port. After -logging in and setting the root password, ssh was available and I -could start to set it up as a batman-adv mesh node.</p> - -<p>I started off by reading the instructions from -<a href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=Antoine's_Research">Wireless -Africa</a>, which had quite a lot of useful information, but -eventually I followed the recipe from the Open Mesh wiki for -<a href="http://www.open-mesh.org/projects/batman-adv/wiki/Batman-adv-openwrt-config">using -batman-adv on OpenWrt</a>. A small snag was the fact that the -<tt>opkg install kmod-batman-adv</tt> command did not work as it -should. The batman-adv kernel module would fail to load because its -dependency crc16 was not already loaded. I -<a href="https://dev.openwrt.org/ticket/14452">reported the bug</a> to -the openwrt project and hope it will be fixed soon. But the problem -only seem to affect initial testing of batman-adv, as configuration -seem to work when booting from scratch.</p> - -<p>The setup is done using files in /etc/config/. I did not bridge -the Ethernet and mesh interfaces this time, to be able to hook up the -box on my local network and log into it for configuration updates. -The following files were changed and look like this after modifying -them:</p> - -<p><tt>/etc/config/network</tt></p> - -<pre> - -config interface 'loopback' - option ifname 'lo' - option proto 'static' - option ipaddr '127.0.0.1' - option netmask '255.0.0.0' - -config globals 'globals' - option ula_prefix 'fdbf:4c12:3fed::/48' - -config interface 'lan' - option ifname 'eth0' - option type 'bridge' - option proto 'dhcp' - option ipaddr '192.168.1.1' - option netmask '255.255.255.0' - option hostname 'tl-mr3040' - option ip6assign '60' - -config interface 'mesh' - option ifname 'adhoc0' - option mtu '1528' - option proto 'batadv' - option mesh 'bat0' -</pre> - -<p><tt>/etc/config/wireless</tt></p> -<pre> - -config wifi-device 'radio0' - option type 'mac80211' - option channel '11' - option hwmode '11ng' - option path 'platform/ar933x_wmac' - option htmode 'HT20' - list ht_capab 'SHORT-GI-20' - list ht_capab 'SHORT-GI-40' - list ht_capab 'RX-STBC1' - list ht_capab 'DSSS_CCK-40' - option disabled '0' - -config wifi-iface 'wmesh' - option device 'radio0' - option ifname 'adhoc0' - option network 'mesh' - option encryption 'none' - option mode 'adhoc' - option bssid '02:BA:00:00:00:01' - option ssid 'meshfx@hackeriet' -</pre> -<p><tt>/etc/config/batman-adv</tt></p> -<pre> - -config 'mesh' 'bat0' - option interfaces 'adhoc0' - option 'aggregated_ogms' - option 'ap_isolation' - option 'bonding' - option 'fragmentation' - option 'gw_bandwidth' - option 'gw_mode' - option 'gw_sel_class' - option 'log_level' - option 'orig_interval' - option 'vis_mode' - option 'bridge_loop_avoidance' - option 'distributed_arp_table' - option 'network_coding' - option 'hop_penalty' - -# yet another batX instance -# config 'mesh' 'bat5' -# option 'interfaces' 'second_mesh' -</pre> - -<p>The mesh node is now operational. I have yet to test its range, -but I hope it is good. I have not yet tested the TP-Link 3600 box -still wrapped up in plastic.</p> - - - - - Debian init.d boot script example for rsyslog - http://people.skolelinux.org/pere/blog/Debian_init_d_boot_script_example_for_rsyslog.html - http://people.skolelinux.org/pere/blog/Debian_init_d_boot_script_example_for_rsyslog.html - Sat, 2 Nov 2013 22:40:00 +0100 - <p>If one of the points of switching to a new init system in Debian is -<a href="http://thomas.goirand.fr/blog/?p=147">to get rid of huge -init.d scripts</a>, I doubt we need to switch away from sysvinit and -init.d scripts at all. Here is an example init.d script, ie a rewrite -of /etc/init.d/rsyslog:</p> - -<p><pre> -#!/lib/init/init-d-script -### BEGIN INIT INFO -# Provides: rsyslog -# Required-Start: $remote_fs $time -# Required-Stop: umountnfs $time -# X-Stop-After: sendsigs -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: enhanced syslogd -# Description: Rsyslog is an enhanced multi-threaded syslogd. -# It is quite compatible to stock sysklogd and can be -# used as a drop-in replacement. -### END INIT INFO -DESC="enhanced syslogd" -DAEMON=/usr/sbin/rsyslogd -</pre></p> - -<p>Pretty minimalistic to me... For the record, the original sysv-rc -script was 137 lines, and the above is just 15 lines, most of it meta -info/comments.</p> - -<p>How to do this, you ask? Well, one create a new script -/lib/init/init-d-script looking something like this: - -<p><pre> -#!/bin/sh - -# Define LSB log_* functions. -# Depend on lsb-base (>= 3.2-14) to ensure that this file is present -# and status_of_proc is working. -. /lib/lsb/init-functions - -# -# Function that starts the daemon/service - -# -do_start() -{ - # Return - # 0 if daemon has been started - # 1 if daemon was already running - # 2 if daemon could not be started - start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ - || return 1 - start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ - $DAEMON_ARGS \ - || return 2 - # Add code here, if necessary, that waits for the process to be ready - # to handle requests from services started subsequently which depend - # on this one. As a last resort, sleep for some time. -} - -# -# Function that stops the daemon/service -# -do_stop() -{ - # Return - # 0 if daemon has been stopped - # 1 if daemon was already stopped - # 2 if daemon could not be stopped - # other if a failure occurred - start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME - RETVAL="$?" - [ "$RETVAL" = 2 ] && return 2 - # Wait for children to finish too if this is a daemon that forks - # and if the daemon is only ever run from this initscript. - # If the above conditions are not satisfied then add some other code - # that waits for the process to drop all resources that could be - # needed by services started subsequently. A last resort is to - # sleep for some time. - start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON - [ "$?" = 2 ] && return 2 - # Many daemons don't delete their pidfiles when they exit. - rm -f $PIDFILE - return "$RETVAL" -} - -# -# Function that sends a SIGHUP to the daemon/service -# -do_reload() { - # - # If the daemon can reload its configuration without - # restarting (for example, when it is sent a SIGHUP), - # then implement that here. - # - start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME - return 0 -} - -SCRIPTNAME=$1 -scriptbasename="$(basename $1)" -echo "SN: $scriptbasename" -if [ "$scriptbasename" != "init-d-library" ] ; then - script="$1" - shift - . $script -else - exit 0 -fi - -NAME=$(basename $DAEMON) -PIDFILE=/var/run/$NAME.pid - -# Exit if the package is not installed -#[ -x "$DAEMON" ] || exit 0 - -# Read configuration variable file if it is present -[ -r /etc/default/$NAME ] && . /etc/default/$NAME - -# Load the VERBOSE setting and other rcS variables -. /lib/init/vars.sh - -case "$1" in - start) - [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" - do_start - case "$?" in - 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; - 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; - esac - ;; - stop) - [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" - do_stop - case "$?" in - 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; - 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; - esac - ;; - status) - status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? - ;; - #reload|force-reload) - # - # If do_reload() is not implemented then leave this commented out - # and leave 'force-reload' as an alias for 'restart'. - # - #log_daemon_msg "Reloading $DESC" "$NAME" - #do_reload - #log_end_msg $? - #;; - restart|force-reload) - # - # If the "reload" option is implemented then remove the - # 'force-reload' alias - # - log_daemon_msg "Restarting $DESC" "$NAME" - do_stop - case "$?" in - 0|1) - do_start - case "$?" in - 0) log_end_msg 0 ;; - 1) log_end_msg 1 ;; # Old process is still running - *) log_end_msg 1 ;; # Failed to start - esac - ;; - *) - # Failed to stop - log_end_msg 1 - ;; - esac - ;; - *) - echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 - exit 3 - ;; -esac - -: -</pre></p> - -<p>It is based on /etc/init.d/skeleton, and could be improved quite a -lot. I did not really polish the approach, so it might not always -work out of the box, but you get the idea. I did not try very hard to -optimize it nor make it more robust either.</p> - -<p>A better argument for switching init system in Debian than reducing -the size of init scripts (which is a good thing to do anyway), is to -get boot system that is able to handle the kernel events sensibly and -robustly, and do not depend on the boot to run sequentially. The boot -and the kernel have not behaved sequentially in years.</p> - - -