Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 140571 Details for
Bug 205117
Enhancement to the suggested pmg_switch_runlevel.sh script
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Updated version of the suggested script
pmg_switch_runlevel.sh (text/plain), 834 bytes, created by
Vincent Poinot
on 2008-01-09 20:38:23 UTC
(
hide
)
Description:
Updated version of the suggested script
Filename:
MIME Type:
Creator:
Vincent Poinot
Created:
2008-01-09 20:38:23 UTC
Size:
834 bytes
patch
obsolete
>#!/bin/bash > > >BATTERY="battery" > >RUNLEVEL_CURRENT="$(</var/lib/init.d/softlevel)" >RUNLEVEL_AC="${RUNLEVEL_CURRENT%%_$BATTERY}" >RUNLEVEL_BATTERY="${RUNLEVEL_AC}_${BATTERY}" > > >if on_ac_power; then > > if [[ "${RUNLEVEL_CURRENT}" = "${RUNLEVEL_BATTERY}" ]]; then > > if [ ! -d "/etc/runlevels/${RUNLEVEL_AC}" ]; then > logger "${0}: no runlevel ${RUNLEVEL_AC}. Aborting." > exit 1 > fi > > logger "Switching to ${RUNLEVEL_AC}." > /sbin/rc ${RUNLEVEL_AC} > > fi > >else > > if [[ "${RUNLEVEL_CURRENT}" != "${RUNLEVEL_BATTERY}" ]]; then > > if [ ! -d "/etc/runlevels/${RUNLEVEL_BATTERY}" ]; then > logger "${0}: no runlevel ${RUNLEVEL_BATTERY}. Aborting." > exit 1 > fi > > logger "Switching to ${RUNLEVEL_BATTERY}." > /sbin/rc ${RUNLEVEL_BATTERY} > > fi > >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 Raw
Actions:
View
Attachments on
bug 205117
: 140571