Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 120214 Details for
Bug 179669
kernel.eselect module improvement for FreeBSD
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
kernel.eselect.diff
kernel.eselect.diff (text/plain), 2.85 KB, created by
Pierre Guinoiseau
on 2007-05-24 19:27:04 UTC
(
hide
)
Description:
kernel.eselect.diff
Filename:
MIME Type:
Creator:
Pierre Guinoiseau
Created:
2007-05-24 19:27:04 UTC
Size:
2.85 KB
patch
obsolete
>--- kernel.eselect 2007-05-24 21:18:13 +0200 >+++ /usr/share/eselect/modules/kernel.eselect 2007-05-24 21:19:20 +0200 >@@ -2,21 +2,26 @@ > # Distributed under the terms of the GNU General Public License v2 > # $Id: kernel.eselect 367 2007-03-28 14:35:23Z pioto $ > >-DESCRIPTION="Manage the /usr/src/linux symlink" >+case `uname -s` in >+ FreeBSD) KERNEL="sys";; >+ *) KERNEL="linux";; >+esac >+ >+DESCRIPTION="Manage the /usr/src/$KERNEL symlink" > MAINTAINER="ciaranm@gentoo.org" > SVN_DATE='$Date: 2007-03-28 10:35:23 -0400 (Wed, 28 Mar 2007) $' > VERSION=$(svn_date_to_version "${SVN_DATE}" ) > > # find a list of kernel symlink targets > find_targets() { >- for f in ${ROOT}/usr/src/linux-[[:digit:]]* ; do >+ for f in ${ROOT}/usr/src/$KERNEL-[[:digit:]]* ; do > [[ -d ${f} ]] && echo $(basename ${f} ) > done > } > > # try to remove the kernel symlink > remove_symlink() { >- rm "${ROOT}/usr/src/linux" >+ rm "${ROOT}/usr/src/$KERNEL" > } > > # set the kernel symlink >@@ -30,11 +35,11 @@ > die -q "Target \"${1}\" doesn't appear to be valid!" > elif [[ -d "${ROOT}/usr/src/${target}" ]] ; then > pushd "${ROOT}/usr/src" 1>/dev/null >- ln -s "${target}" "linux" >+ ln -s "${target}" "$KERNEL" > popd 1>/dev/null >- elif [[ -d "${ROOT}/usr/src/linux-${target}" ]] ; then >+ elif [[ -d "${ROOT}/usr/src/$KERNEL-${target}" ]] ; then > pushd "${ROOT}/usr/src" 1>/dev/null >- ln -s "linux-${target}" "linux" >+ ln -s "$KERNEL-${target}" "$KERNEL" > popd 1>/dev/null > else > die -q "Target \"${1}\" doesn't appear to be valid!" >@@ -51,8 +56,8 @@ > local kernel > > write_list_start "Current kernel symlink:" >- if [[ -L "${ROOT}/usr/src/linux" ]] ; then >- kernel=$(canonicalise ${ROOT}/usr/src/linux ) >+ if [[ -L "${ROOT}/usr/src/$KERNEL" ]] ; then >+ kernel=$(canonicalise ${ROOT}/usr/src/$KERNEL ) > write_kv_list_entry "${kernel%/}" "" > else > write_kv_list_entry "(unset)" "" >@@ -71,7 +76,7 @@ > if [[ -n ${targets[@]} ]] ; then > local i > for (( i = 0 ; i < ${#targets[@]} ; i = i + 1 )) ; do >- [[ ${targets[${i}]} == $(basename $(canonicalise ${ROOT}/usr/src/linux)) ]] && \ >+ [[ ${targets[${i}]} == $(basename $(canonicalise ${ROOT}/usr/src/$KERNEL)) ]] && \ > targets[${i}]="${targets[${i}]} $(highlight '*' )" > done > write_numbered_list "${targets[@]}" >@@ -99,7 +104,7 @@ > # no parameter > die -q "You didn't tell me what to set the symlink to" > >- elif [[ -L "${ROOT}/usr/src/linux" ]] ; then >+ elif [[ -L "${ROOT}/usr/src/$KERNEL" ]] ; then > # existing symlink > if ! remove_symlink ; then > die -q "Couldn't remove existing symlink" >@@ -107,9 +112,9 @@ > die -q "Couldn't set a new symlink" > fi > >- elif [[ -e "${ROOT}/usr/src/linux" ]] ; then >+ elif [[ -e "${ROOT}/usr/src/$KERNEL" ]] ; then > # we have something strange >- die -q "Sorry, ${ROOT}/usr/src/linux confuses me" >+ die -q "Sorry, ${ROOT}/usr/src/$KERNEL confuses me" > > else > set_symlink "${1}" || die -q "Couldn't set a new symlink"
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 179669
: 120214