Skip site navigation (1)Skip section navigation (2)
Date:      17 Feb 2002 06:14:30 -0000
From:      Mike Meyer <mwm@mired.org>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/35028: NEW PORT: saves and restores mixer states across reboot.
Message-ID:  <20020217061430.16738.qmail@mired.org>

next in thread | raw e-mail | index | archive | help

>Number:         35028
>Category:       ports
>Synopsis:       NEW PORT: saves and restores mixer states across reboot.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Feb 16 22:20:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Mike Meyer
>Release:        FreeBSD 4.5-STABLE i386
>Organization:
Meyer Consulting
>Environment:
System: FreeBSD guru.mired.org 4.5-STABLE FreeBSD 4.5-STABLE #15: Sat Feb 16 00:40:53 CST 2002 mwm@guru.mired.org:/usr/src/sys/compile/GURU i386


>Description:
	Rebooting the system loses all your mixer settings.
>How-To-Repeat:
	Carefully adjust your mixer settings, then reboot and notice they've
	all changed.
>Fix:

The attached part adds a script to ${PREFIX}/etc/rc.d that saves the mixer
settings on shutdown, and restores them on reboot.

	<mike

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	mixer
#	mixer/Makefile
#	mixer/pkg-plist
#	mixer/pkg-descr
#	mixer/pkg-comment
#	mixer/files
#	mixer/files/mixer.sh
#
echo c - mixer
mkdir -p mixer > /dev/null 2>&1
echo x - mixer/Makefile
sed 's/^X//' >mixer/Makefile << 'END-of-mixer/Makefile'
X# New ports collection makefile for: mixer
X# Date created:		17 February 2002
X# Whom:			mwm@mired.org
X#
X# $FreeBSD$
X#
X
XPORTNAME=	mixer
XPORTVERSION=	1.0
XCATEGORIES=	sysutils
XMASTER_SITES=	# empty
XDISTFILES=	# empty
XEXTRACT_ONLY=	# empty
X
XMAINTAINER=    mwm@mired.org
X
XNO_BUILD=yes
X
Xdo-install:
X	${INSTALL_SCRIPT} ${FILESDIR}/mixer.sh ${PREFIX}/etc/rc.d
X
X.include <bsd.port.mk>
END-of-mixer/Makefile
echo x - mixer/pkg-plist
sed 's/^X//' >mixer/pkg-plist << 'END-of-mixer/pkg-plist'
Xetc/rc.d/mixer.sh
END-of-mixer/pkg-plist
echo x - mixer/pkg-descr
sed 's/^X//' >mixer/pkg-descr << 'END-of-mixer/pkg-descr'
XThis port installs a simple shellscript in ${PREFIX}/etc/rc.d that saves
Xthe state of the mixer when the system is shut down, and restores it when
Xthe system is rebooted.
END-of-mixer/pkg-descr
echo x - mixer/pkg-comment
sed 's/^X//' >mixer/pkg-comment << 'END-of-mixer/pkg-comment'
XA startup/shutdown script to preserve mixer settings across reboots
END-of-mixer/pkg-comment
echo c - mixer/files
mkdir -p mixer/files > /dev/null 2>&1
echo x - mixer/files/mixer.sh
sed 's/^X//' >mixer/files/mixer.sh << 'END-of-mixer/files/mixer.sh'
X#!/bin/sh
X
XMIXERSTATE=/var/db/mixer-state
X
Xcase $1 in
Xstart)
X    [ -r $MIXERSTATE ] && /usr/sbin/mixer `cat $MIXERSTATE` > /dev/null
X    ;;
Xstop)
X    /usr/sbin/mixer -s > $MIXERSTATE
X    ;;
X*)
X    echo "usage: `basename $0` {start|stop}" >&2
X    exit 64
X    ;;
Xesac
END-of-mixer/files/mixer.sh
exit




>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020217061430.16738.qmail>