Table of ContentOverview PagePrevious PageNext Page

7. Using Sharity from the Commandline

Although it is most comfortable to interact with Sharity through the GUI application, there are situations where the commandline interface has advantages. You can use it from within scripts, remotely from a terminal or on machines with no graphics display installed. Everything which can be done from the GUI can also be done from the commandline, except changing the configuration. If you have to change the configuration without GUI, edit the file cfgdb.ppl or sharity.cfg. Almost every option in sharity.cfg can be overwritten by an equally named option in cfgdb.ppl.

7.1 Commandline Utilities

There's in fact only one executable which performs all commandline operations. The name of this executable is sharity. The first parameter is the function you want to perform, for instance:
    sharity cifslist
This command executes the cifslist function. Because it's uncomfortable to call each function this way, symbolic links are made to the sharity executable under the names cifsmount, cifslist, etc. The sharity executable detects automatically when it has been called under one of these names and performs the respective function. The above example can therefore be simplified to:
    cifslist
Only the CIFS related functions have such shorthand invocations because a name conflict with other commandline utilities is unlikely. Functions like mount must be called the long way because the shorthand form would collide with a system utility's name.

Here's an overview over the implemented functions. If you want to know more about the commandline parameters of a specific function, call it with option -h to get help or with the option -man for the full manual page. You can also get to the manual page of a function by clicking its name in the following list.

mount
This is a generic mount function which can be used to mount with any modules. You will normally not use this mount function because cifsmount is more appropriate for mounting file shares. However, it may be used to mount browsers with the cifsBrowse module and other backends which may be available.

umount
This is a generic unmount function which unmounts any mountpoint you specify, regardless of the modules used for the mount. This function is also available under the name cifsumount.

storemnt
This function manipulates Sharity's database of stored mounts. A stored mount is automatically re-established after system startup. You can add to or remove entries from the database. This function is also available under the name cifsstoremnt

list
This function displays internal status information of Sharity or of a module. It needs to know what should be listed. Lists are referenced by name. Each module can announce lists which are then available to the list function.

cifsmount
This function is used to mount file shares. Since CIFS requires a valid login to be able to mount, you will be asked for credentials (unless the login is already established).

cifsumount
This function is the same as umount: It unmounts the mountpoint specified on the commandline.

cifslogin
This function establishes a login at the given server. It asks the user for credentials.

cifslogout
This function logs you out from the given server. It does not affect stored credentials.

cifslist
This function displays the list of mounts and/or the list of logins. It is based on the list function.

cifslicense
This function is used to set the license key, or to query the daemon for current license utilization, for the current license data or the license limits.

cifsstore
This function manipulates the database of stored credentials. You can add to or remove records from the database.

cifsstoremnt
This function is the same as storemnt. It's used to manipulate the database of stored mounts.

Table of ContentOverview PagePrevious PageNext Page


Sharity Manual 2.9 Beta 7 | Copyright (C) 2004 OBJECTIVE DEVELOPMENT Software GmbH | http://www.obdev.at/