From 49deddce82fbb5ab4020815d4a59390b655ff16c Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Sat, 16 Jul 2011 11:55:43 +0200 Subject: Properly integrate the translator primer. --- hurd/documentation.mdwn | 4 +- hurd/documentation/translator-primer.mdwn | 57 ------------------------- hurd/documentation/translator_primer.mdwn | 70 +++++++++++++++++++++++++++++++ hurd/translator.mdwn | 2 + 4 files changed, 75 insertions(+), 58 deletions(-) delete mode 100644 hurd/documentation/translator-primer.mdwn create mode 100644 hurd/documentation/translator_primer.mdwn diff --git a/hurd/documentation.mdwn b/hurd/documentation.mdwn index 874ce847..48fd017c 100644 --- a/hurd/documentation.mdwn +++ b/hurd/documentation.mdwn @@ -1,5 +1,5 @@ [[!meta copyright="Copyright © 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -2009 Free Software Foundation, Inc."]] +2009, 2011 Free Software Foundation, Inc."]] [[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable id="license" text="Permission is granted to copy, distribute and/or modify this @@ -24,6 +24,8 @@ is included in the section entitled * [[*The_Hurd*|/hurd-talk]], a presentation by Marcus Brinkmann. + * The *[[translator_primer]]*. + * A document about *[[translators]]* by Marcus Brinkmann. * [[*A_Critique_of_the_GNU_Hurd_Multi-server_Operating_System*|critique]], an diff --git a/hurd/documentation/translator-primer.mdwn b/hurd/documentation/translator-primer.mdwn deleted file mode 100644 index 67c52977..00000000 --- a/hurd/documentation/translator-primer.mdwn +++ /dev/null @@ -1,57 +0,0 @@ -Small examples on using translators -=================================== - -## Intro - -The Hurd has some unique capabilities, and we created this simple image -to enable you to easily try two of them: - -* The simplest of translators: Hello World! -* Transparent FTP - -### Hello World - -To try out the simplest of translators, you can go the following simple steps: - - $ cat hello - $ setrans hello /hurd/hello - $ cat hello - "Hello World!" - $ settrans -g hello - $ cat hello - -What you do with these steps is first verifying that the file "hello" is empty. - -Then you setup the translator /hurd/hello in the file/node hello. - -After that you check the contents of the file, and the translator returns "Hello World!". - -To finish it, you tell the translator to go away from the file "hello" via "settrans -g hello" and verify that now the file is empty again. - -### Transparent FTP - -We already setup a a transparent FTP translator for you at /ftp: - -With it you can easily access public FTP via the file system, for example the one from the GNU project: - - $ ls /ftp://ftp.gnu.org/ - -But you can also do this very easily yourself: - - $ # Setup the translator on the node ftp: - $ settrans -c ftp: /hurd/hostmux /hurd/ftpfs / - -and you can access FTP sites via the pseudo-directory ftp:, for example with - - $ ls ftp://ftp.gnu.org/ - -What you do here is setting up the translator /hurd/hostmux on ftp: and passing it the translator /hurd/ftpfs to use for resolving accesses as well as / as additional path component. - - -These were only two basic usages of translators on the Hurd. We're sure you'll quickly see many other ways to use this. - -As a last comment: You can setup a translator on any node you have access to, so you can for example mount any filesystems as normal user. - -You might currently be logged in as root, but you could just as well do the same as normal user. - -Why don't you try it out? diff --git a/hurd/documentation/translator_primer.mdwn b/hurd/documentation/translator_primer.mdwn new file mode 100644 index 00000000..d8d89148 --- /dev/null +++ b/hurd/documentation/translator_primer.mdwn @@ -0,0 +1,70 @@ +[[!meta copyright="Copyright © 2011 Free Software Foundation, Inc."]] + +[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable +id="license" text="Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no Invariant +Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] + +# Small Examples on Using Translators + +The [[concept|concepts]] of user-space servers, [[translator]]s, is a very +powerful one. Here is an introductionary text. + + +## Intro + +The Hurd has some unique capabilities, and we created this simple image +to enable you to easily try two of them: + +* The simplest of translators: Hello World! +* Transparent FTP + +### Hello World + +To try out the simplest of translators, you can go the following simple steps: + + $ cat hello + $ setrans hello /hurd/hello + $ cat hello + "Hello World!" + $ settrans -g hello + $ cat hello + +What you do with these steps is first verifying that the file "hello" is empty. + +Then you setup the translator /hurd/hello in the file/node hello. + +After that you check the contents of the file, and the translator returns "Hello World!". + +To finish it, you tell the translator to go away from the file "hello" via "settrans -g hello" and verify that now the file is empty again. + +### Transparent FTP + +We already setup a a transparent FTP translator for you at /ftp: + +With it you can easily access public FTP via the file system, for example the one from the GNU project: + + $ ls /ftp://ftp.gnu.org/ + +But you can also do this very easily yourself: + + $ # Setup the translator on the node ftp: + $ settrans -c ftp: /hurd/hostmux /hurd/ftpfs / + +and you can access FTP sites via the pseudo-directory ftp:, for example with + + $ ls ftp://ftp.gnu.org/ + +What you do here is setting up the translator /hurd/hostmux on ftp: and passing it the translator /hurd/ftpfs to use for resolving accesses as well as / as additional path component. + + +These were only two basic usages of translators on the Hurd. We're sure you'll quickly see many other ways to use this. + +As a last comment: You can setup a translator on any node you have access to, so you can for example mount any filesystems as normal user. + +You might currently be logged in as root, but you could just as well do the same as normal user. + +Why don't you try it out? diff --git a/hurd/translator.mdwn b/hurd/translator.mdwn index 6f385b50..aa8b966a 100644 --- a/hurd/translator.mdwn +++ b/hurd/translator.mdwn @@ -63,6 +63,8 @@ Also there is an [[writing/example]] about how to write a simple translator. See some [[examples]] about how to use translators. +There is a [[documentation/translator_primer]]. + Marcus Brinkmann has written a document about [[documentation/translators]]. Here are some [[hints_about_debugging_translators|debugging/translator]] -- cgit v1.2.3