Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 75382 Details for
Bug 116220
OpenAFS 1.4 client sturtup script assumes 2.6 kernel only
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
New attempt for patch to init script to work under both 2.4 and 2.6
patch (text/plain), 2.73 KB, created by
Stefaan De Roeck (RETIRED)
on 2005-12-23 01:35:34 UTC
(
hide
)
Description:
New attempt for patch to init script to work under both 2.4 and 2.6
Filename:
MIME Type:
Creator:
Stefaan De Roeck (RETIRED)
Created:
2005-12-23 01:35:34 UTC
Size:
2.73 KB
patch
obsolete
>--- /tmp/openafs-client-old 2005-11-13 18:06:46.000000000 +0100 >+++ openafs-client 2005-12-23 10:29:46.000000000 +0100 >@@ -10,22 +10,22 @@ > > choose_afsdoptions() { > CACHESIZE=$(cut -d ':' -f 3 /etc/openafs/cacheinfo) >- if [ -z "$OPTIONS" -o "$OPTIONS" = "AUTOMATIC" ]; then >- if [ $CACHESIZE -lt 131072 ]; then >+ if [[ -z "$OPTIONS" || "$OPTIONS" = "AUTOMATIC" ]]; then >+ if [[ $CACHESIZE -lt 131072 ]]; then > OPTIONS=$SMALL >- elif [ $CACHESIZE -lt 524288 ]; then >+ elif [[ $CACHESIZE -lt 524288 ]]; then > OPTIONS=$MEDIUM >- elif [ $CACHESIZE -lt 1048576 ]; then >+ elif [[ $CACHESIZE -lt 1048576 ]]; then > OPTIONS=$LARGE >- elif [ $CACHESIZE -lt 2097152 ]; then >+ elif [[ $CACHESIZE -lt 2097152 ]]; then > OPTIONS=$XLARGE > else > OPTIONS=$XXLARGE > fi > fi > AFSD_OPTIONS="$OPTIONS $VERBOSE" >- [ "$ENABLE_AFSDB" = "yes" ] && AFSD_OPTIONS="$AFSD_OPTIONS -afsdb" >- [ "$ENABLE_DYNROOT" = "yes" ] && AFSD_OPTIONS="$AFSD_OPTIONS -dynroot" >+ [[ "$ENABLE_AFSDB" = "yes" ]] && AFSD_OPTIONS="$AFSD_OPTIONS -afsdb" >+ [[ "$ENABLE_DYNROOT" = "yes" ]] && AFSD_OPTIONS="$AFSD_OPTIONS -dynroot" > } > > start() { >@@ -38,34 +38,47 @@ > if pgrep -u 0 afsd &> /dev/null; then > eerror "afsd already running, not attempting to restart" > eend 1 >- elif [ ! -f /lib/modules/$(uname -r)/kernel/fs/openafs/openafs.ko ]; then >- eerror "OpenAFS kernel module not found, please re-emerge openafs-kernel" >- eend 1 >- else >- ebegin "Loading OpenAFS kernel module" >+ elif [[ -d /proc/fs/openafs ]]; then >+ ewarn "OpenAFS already active, trying to unload module" > if ! modprobe -r openafs; then > eerror "OpenAFS kernel module was loaded, unloading failed" > eend 1 >- elif ! modprobe openafs; then >- eerror "Failed cleanly (re)loading the afs kernel module" >- eend 1 > else >- eend 0 >- ebegin "Starting OpenAFS daemon" >- choose_afsdoptions >- /usr/sbin/afsd ${AFSD_OPTIONS} &> /dev/null >+ cleanstart > failed=$? > eend $failed > fi >+ else >+ cleanstart >+ failed=$? >+ eend $failed > fi > > eoutdent > >- if [ $failed != 0 ]; then >+ if [[ $failed != 0 ]]; then > return 1 > fi > } > >+cleanstart() >+{ >+ ebegin "Loading OpenAFS kernel module" >+ if ! modprobe openafs; then >+ eerror "Failed loading the afs kernel module" >+ eend 1 >+ return 1 >+ else >+ eend 0 >+ ebegin "Starting OpenAFS daemon" >+ choose_afsdoptions >+ /usr/sbin/afsd ${AFSD_OPTIONS} &> /dev/null >+ failed=$? >+ eend $failed >+ return $failed >+ fi >+} >+ > stop() { > ebegin "Stopping OpenAFS client" > failed=1 >@@ -83,7 +96,7 @@ > failed=$? > eend $failed > >- if [ $failed = 0 ]; then >+ if [[ $failed = 0 ]]; then > ebegin "Unloading OpenAFS module" > modprobe -r openafs > failed=$? >@@ -93,7 +106,7 @@ > > eoutdent > >- if [ $failed != 0 ]; then >+ if [[ $failed != 0 ]]; then > return 1 > fi > }
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 116220
:
75248
| 75382