Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 50533 Details for
Bug 55973
modifications to baselayout to add vserver-support
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
rc-scripts-1.6.9-vserver.diff
rc-scripts-1.6.9-vserver.diff (text/plain), 6.57 KB, created by
Benedikt Böhm (RETIRED)
on 2005-02-06 05:50:41 UTC
(
hide
)
Description:
rc-scripts-1.6.9-vserver.diff
Filename:
MIME Type:
Creator:
Benedikt Böhm (RETIRED)
Created:
2005-02-06 05:50:41 UTC
Size:
6.57 KB
patch
obsolete
>diff -Nur rc-scripts-1.6.9/init.d/checkfs rc-scripts-1.6.9-vserver/init.d/checkfs >--- rc-scripts-1.6.9/init.d/checkfs 2005-01-30 23:01:18.000000000 +0100 >+++ rc-scripts-1.6.9-vserver/init.d/checkfs 2005-02-06 13:39:02.673406424 +0100 >@@ -8,6 +8,9 @@ > } > > start() { >+ # VServers aren't allowed to fsck by default >+ is_vserver_sys && return 0 >+ > local retval=0 > > # Start software raid. >diff -Nur rc-scripts-1.6.9/init.d/checkroot rc-scripts-1.6.9-vserver/init.d/checkroot >--- rc-scripts-1.6.9/init.d/checkroot 2005-01-30 23:17:37.000000000 +0100 >+++ rc-scripts-1.6.9-vserver/init.d/checkroot 2005-02-06 13:39:02.674406272 +0100 >@@ -8,6 +8,9 @@ > } > > start() { >+ # VServers aren't allowed to fsck/mount by default >+ is_vserver_sys && return 0 >+ > local retval=0 > > if [[ ! -f /fastboot && -z ${CDBOOT} ]] ; then >diff -Nur rc-scripts-1.6.9/init.d/clock rc-scripts-1.6.9-vserver/init.d/clock >--- rc-scripts-1.6.9/init.d/clock 2005-01-30 22:23:10.000000000 +0100 >+++ rc-scripts-1.6.9-vserver/init.d/clock 2005-02-06 13:39:02.674406272 +0100 >@@ -12,9 +12,15 @@ > setupopts() { > if is_uml_sys ; then > TBLURB="UML" >+ fakeit=1 >+ return 0 >+ elif is_vserver_sys ; then >+ TBLURB="VServer" >+ fakeit=1 > return 0 > elif grep -q ' cobd$' /proc/devices ; then > TBLURB="coLinux" >+ fakeit=1 > return 0 > elif [[ ${CLOCK} == "UTC" ]] ; then > myopts="--utc" >@@ -47,7 +53,7 @@ > start() { > local myopts="" > local myadj="" >- local TBLURB="" >+ local TBLURB="" fakeit=0 > local errstr="" > local readonly="no" > local ret=0 >@@ -61,7 +67,7 @@ > setupopts > > ebegin "Setting system clock to hardware clock [${TBLURB}]" >- if [[ ${TBLURB} == "UML" ]] || [[ ${TBLURB} == "coLinux" ]] ; then >+ if [[ ${fakeit} -eq 1 ]] ; then > ret=0 > > elif [[ -x /sbin/hwclock ]] ; then >diff -Nur rc-scripts-1.6.9/init.d/consolefont rc-scripts-1.6.9-vserver/init.d/consolefont >--- rc-scripts-1.6.9/init.d/consolefont 2005-01-30 23:17:37.000000000 +0100 >+++ rc-scripts-1.6.9-vserver/init.d/consolefont 2005-02-06 13:39:02.675406120 +0100 >@@ -14,6 +14,10 @@ > ebegin "Setting user font" > eend 0 > return 0 >+ elif is_vserver_sys ; then >+ ebegin "Setting user font" >+ eend 0 >+ return 0 > elif [[ -z ${CONSOLEFONT} ]] ; then > ebegin "Using the default console font" > eend 0 >diff -Nur rc-scripts-1.6.9/init.d/halt.sh rc-scripts-1.6.9-vserver/init.d/halt.sh >--- rc-scripts-1.6.9/init.d/halt.sh 2005-01-30 23:01:18.000000000 +0100 >+++ rc-scripts-1.6.9-vserver/init.d/halt.sh 2005-02-06 13:39:02.676405968 +0100 >@@ -2,6 +2,9 @@ > # Distributed under the terms of the GNU General Public License v2 > # $Header: /var/cvsroot/gentoo-src/rc-scripts/init.d/halt.sh,v 1.64.2.3 2005/01/30 22:01:18 vapier Exp $ > >+# VServers don't need to handle mounts/etc... >+is_vserver_sys && exit 0 >+ > # Check to see if this is a livecd, if it is read the commandline > # this mainly makes sure $CDBOOT is defined if it's a livecd > [ -f "/sbin/livecd-functions.sh" ] && \ >diff -Nur rc-scripts-1.6.9/init.d/hostname rc-scripts-1.6.9-vserver/init.d/hostname >--- rc-scripts-1.6.9/init.d/hostname 2005-01-30 22:23:10.000000000 +0100 >+++ rc-scripts-1.6.9-vserver/init.d/hostname 2005-02-06 13:39:02.677405816 +0100 >@@ -8,6 +8,9 @@ > } > > start() { >+ # VServers don't need to set the hostname >+ is_vserver_sys && return 0 >+ > local myhost=$(/bin/hostname 2>/dev/null) > local retval=0 > >diff -Nur rc-scripts-1.6.9/init.d/keymaps rc-scripts-1.6.9-vserver/init.d/keymaps >--- rc-scripts-1.6.9/init.d/keymaps 2005-01-30 22:23:10.000000000 +0100 >+++ rc-scripts-1.6.9-vserver/init.d/keymaps 2005-02-06 13:39:02.678405664 +0100 >@@ -24,6 +24,10 @@ > ebegin "Loading key mappings" > eend 0 > return 0 >+ elif is_vserver_sys ; then >+ ebegin "Loading key mappings" >+ eend 0 >+ return 0 > fi > > local WINDOWKEYS_KEYMAP= >diff -Nur rc-scripts-1.6.9/init.d/localmount rc-scripts-1.6.9-vserver/init.d/localmount >--- rc-scripts-1.6.9/init.d/localmount 2005-01-30 23:01:18.000000000 +0100 >+++ rc-scripts-1.6.9-vserver/init.d/localmount 2005-02-06 13:39:02.680405360 +0100 >@@ -8,6 +8,9 @@ > } > > start() { >+ # VServers aren't allowed to mount by default >+ is_vserver_sys && return 0 >+ > # Mount local filesystems in /etc/fstab. > ebegin "Mounting local filesystems" > mount -at noproc,noshm,no${NET_FS_LIST// /,no} >/dev/null >diff -Nur rc-scripts-1.6.9/init.d/modules rc-scripts-1.6.9-vserver/init.d/modules >--- rc-scripts-1.6.9/init.d/modules 2005-01-30 23:17:37.000000000 +0100 >+++ rc-scripts-1.6.9-vserver/init.d/modules 2005-02-06 13:39:02.681405208 +0100 >@@ -73,6 +73,9 @@ > # support compiled in ... > [ -f /proc/modules ] || return 0 > >+ # VServer's don't do modules >+ is_vserver_sys && return 0 >+ > # Here we should fail, as a modular kernel do need > # depmod command ... > if [ ! -x /sbin/depmod ] >diff -Nur rc-scripts-1.6.9/init.d/net.eth0 rc-scripts-1.6.9-vserver/init.d/net.eth0 >--- rc-scripts-1.6.9/init.d/net.eth0 2005-01-30 20:02:06.000000000 +0100 >+++ rc-scripts-1.6.9-vserver/init.d/net.eth0 2005-02-06 13:39:02.683404904 +0100 >@@ -3,6 +3,9 @@ > # Distributed under the terms of the GNU General Public License v2 > # $Header: /var/cvsroot/gentoo-src/rc-scripts/net-scripts/init.d/net.lo,v 1.38.2.13 2005/01/25 10:42:54 uberlord Exp $ > >+# VServers aren't allowed to handle interfaces themselves >+is_vserver_sys && exit 0 >+ > # Contributed by Roy Marples (uberlord@gentoo.org) > # Many thanks to Aron Griffis (agriffis@gentoo.org) > # for help, ideas and patches >diff -Nur rc-scripts-1.6.9/init.d/net.lo rc-scripts-1.6.9-vserver/init.d/net.lo >--- rc-scripts-1.6.9/init.d/net.lo 2005-01-30 20:02:06.000000000 +0100 >+++ rc-scripts-1.6.9-vserver/init.d/net.lo 2005-02-06 13:39:02.684404752 +0100 >@@ -3,6 +3,9 @@ > # Distributed under the terms of the GNU General Public License v2 > # $Header: /var/cvsroot/gentoo-src/rc-scripts/net-scripts/init.d/net.lo,v 1.38.2.13 2005/01/25 10:42:54 uberlord Exp $ > >+# VServers aren't allowed to handle interfaces themselves >+is_vserver_sys && exit 0 >+ > # Contributed by Roy Marples (uberlord@gentoo.org) > # Many thanks to Aron Griffis (agriffis@gentoo.org) > # for help, ideas and patches >diff -Nur rc-scripts-1.6.9/sbin/functions.sh rc-scripts-1.6.9-vserver/sbin/functions.sh >--- rc-scripts-1.6.9/sbin/functions.sh 2005-01-30 20:32:34.000000000 +0100 >+++ rc-scripts-1.6.9-vserver/sbin/functions.sh 2005-02-06 13:39:02.686404448 +0100 >@@ -615,7 +615,18 @@ > # EXAMPLE: if is_uml_sys ; then ... > # > is_uml_sys() { >- grep -q 'UML' /proc/cpuinfo &> /dev/null >+ grep -qs 'UML' /proc/cpuinfo >+ return $? >+} >+ >+# bool is_vserver_sys() >+# >+# return 0 if the currently running system is a Linux VServer >+# >+# EXAMPLE: if is_vserver_sys ; then ... >+# >+is_vserver_sys() { >+ grep -qs '^s_context:[[:space:]]*[1-9]' /proc/self/status > return $? > } >
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 55973
:
34714
|
50428
|
50516
| 50533 |
50964