Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 11615 Details for
Bug 20514
arla (new ebuild)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Still have typos. This should be the last one (hopefully)
arlad (text/plain), 2.93 KB, created by
Siuchung Cheung (Clement)
on 2003-05-06 23:41:38 UTC
(
hide
)
Description:
Still have typos. This should be the last one (hopefully)
Filename:
MIME Type:
Creator:
Siuchung Cheung (Clement)
Created:
2003-05-06 23:41:38 UTC
Size:
2.93 KB
patch
obsolete
>#!/sbin/runscript ># Copyright 2003 Clement Siu-Chung Cheung (sccheung at umich dot edu) ># Distributed under the terms of the GNU General Public License v2 ># available at http://www.gnu.org/copyleft/gpl.html > > >arla_dir=${arla_dir:-/usr/arla} >bin_dir=${bin_dir:-${arla_dir}/bin} >etc_dir=${etc_dir:-${arla_dir}/etc} >cache_dir=${cache_dir:-/var/spool/afs} > > >depend() { > need net > provide afs >} > >checkconfig() { > if [ ! -f ${etc_dir}/arla.conf ]; then > eerror "/etc/arla/arla.conf is missing" > return 1 > fi > > if [ ! -f ${etc_dir}/ThisCell ]; then > eerror "/etc/arla/ThisCell is missing" > return 1 > fi > > if [ ! -f ${etc_dir}/CellServDB ]; then > eerror "/etc/arla/CellServDB is missing" > return 1 > fi > > return 0 >} > >start() { > checkconfig || return $? > > if lsmod|grep nnpfs > /dev/null 2>&1; then > einfo "Arla kernel module already loaded" > else > ebegin "Loading Arla kernel module" > insmod ${bin_dir}/nnpfs.o > if [ "$?" != '0' ]; then > eend 1 "Failed to load Arla kernel module" > return 1 > else > eend 0 > fi > > # Give it some time to take effect > sleep 1 > fi > > if [ ! -r /dev/nnpfs0 ]; then > einfo "Creating device..." > mknod /dev/nnpfs0 c 103 0 > fi > chmod 600 /dev/nnpfs0 > > if [ ! -e ${cache_dir} ] ; then > einfo "Creating cache directory..." > mkdir ${cache_dir} > chmod 700 ${cache_dir} > chown root ${cache_dir} > fi > > ebegin "Starting arlad" > > start-stop-daemon --start --quiet --exec ${arla_dir}/libexec/arlad > > if [ "$?" != "0" ]; then > eend 1 "Failed to start arlad" > return 1 > else > eend 0 > fi > > if [ ! -r /afs ] ; then > einfo "Creating /afs..." > mkdir /afs > fi > > # wait for arlad to completely start > sleep 3 > > ebegin "Mounting AFS" > mount -t nnpfs /dev/nnpfs0 /afs > eend $? "Failed to mount AFS" >} > >stop() { > ebegin "Unmounting AFS" > umount /afs > eend 0 > > ebegin "Stopping arlad" > start-stop-daemon --stop --quiet --pidfile /var/run/arlad.pid > > if [ -r /var/run/arlad.pid ]; then > eend $? "Failed to stop arlad with PID="`cat /var/run/arlad.pid > /dev/null 2>&1` > else > eerror "Can't find PID file for arlad." > eerror "arlad probably has not been started successfully or somehow died already!" > # don't eend 1. Otherwise, the user won't be able to stop this > # daemon when things goes wrong. If We're asked to stop it and > # it doesn't exist, the record must be wrong. So just let is > # succeed and reset the status back to "stoped", which is what > # it should be. > eend 0 > fi > > ebegin "Unoading Arla kernel module" > rmmod nnpfs > if [ "$?" != "0" ]; then > # It's fine to fail. The AFS has already stopped. No need to eend 1. > eerror "Failed to unload Arla kernel module" > fi > eend 0 >} >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 20514
:
11557
|
11614
| 11615