X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=README.md;fp=README.md;h=f08718c3a1d6d57fde03babb18f3056b8a79401e;hb=3264e87e6943ae418c910a606142976f0d05e58e;hp=44e111fb00b363f848bb72d36596163d5329e519;hpb=b94faafa111dbec1b5cc45fb588f9258b4ca5abc;p=gsu.git diff --git a/README.md b/README.md index 44e111f..f08718c 100644 --- a/README.md +++ b/README.md @@ -431,23 +431,27 @@ contents of the kernel log buffer. Bash code which defines the menu tree could look like this: menu_tree=' - load_average - processes - hardware/ - cpu - scsi - storage/ - df - mdstat - log/ - syslog - dmesg + load_average System load + processes Running processes of a user + hardware/ Hardware related information + cpu Show prozessor type and features + scsi Show SCSI devices + storage/ Filesystems and software raid + df List of mounted filesystems + mdstat Status of software raid arrays + log/ System and kernel logs + syslog System log + dmesg Kernel log ' -In this tree, `hardware/`, `storage/` and `log/` are the only -internal nodes. Note that these are written with a trailing slash -character while the leaf nodes have no slash at the end. All entries -of the menu tree must be indented by tab characters. +Each line of the menu tree consists of an identifier, suffixed with an +optional slash, and a description. The identifier becomes part of the +name of a bash function and should only contain alphabetic characters +and underscores. The description becomes the text shown as the menu +item. Identifiers suffixed with a slash are regarded as internal nodes +which represent submenus. In the above tree, `hardware/`, `storage/` +and `log/` are internal nodes. All entries of the menu tree must be +properly indented by tab characters. ___Action handlers___ @@ -463,7 +467,7 @@ handler for the `df` node: } The function name `lsi_df` is derived from the name of the script -(`lsi`) and the name of the leaf node (`df`). The function simply +(`lsi`) and the identifier of the leaf node (`df`). The function simply passes the output of the `df(1)` command as the first argument to the public gsu function `gsu_msgbox()` which runs dialog(1) to display a message box that shows the given text. @@ -503,17 +507,17 @@ tab characters into space characters. The script must be named "lsi". #!/bin/bash menu_tree=' - load_average - processes - hardware/ - cpu - scsi - storage/ - df - mdstat - log/ - syslog - dmesg + load_average System load + processes Running processes of a user + hardware/ Hardware related information + cpu Show prozessor type and features + scsi Show SCSI devices + storage/ Filesystems and software raid + df List of mounted filesystems + mdstat Status of software raid arrays + log/ System and kernel logs + syslog System log + dmesg Kernel log ' lsi_load_average()