This site will look much better in a browser that supports web standards, but it is accessible to any browser or Internet device.

BIOSLEVEL

December 4, 2008Home » Articles & Reviews » Articles & Guides » Linux


Main Navigation

Login

Supporters


Add to Technorati Favorites

Upcoming Events

Top Sponsors

Sponsored Ads

Extending uShare with RC Scripts


November 19, 2007
Sean "Obsidian" Potter
Colin "Rhettigan" Dean
uShare
Forums
1 2 3

Let's start by opening a new file, /etc/conf.d/ushare, in your favorite text editor. In this file, we want to configure the options being passed to uShare when its rc-script is started. Let's create four variables, uNAME, uINT, uPORT, and uOPTS. uNAME is the name of the server, $HOSTNAME by default. uINT specifies the interface we're broadcasting on, as uShare currently only supports one interface per instance. uPORT specifies the port number to run uShare on, and uOPTS will hold any other options we decide to pass. Let's look at how my file is set up.

#/etc/conf.d/ushare

# name of the server
uNAME="$HOSTNAME"

# Interface to run uShare on
uINT="eth1"

# Port to run uShare on
uPORT="49152"

# Additional options, note that each shared folder must have it's own -c option.
uOPTS="-x -c /opt/music -c /opt/movies -n $HOSTNAME"

# Comment the above and uncomment the following for PS3 support
# uOPTS="-d -c /opt -n $HOSTNAME"

Simplistic, and yet efficient. Now we need to make our rc-script work with it.
Enjoy the review? Subscribe to our RSS Feed.

« Previous1 2 3 Next »