4
# Provides: oss-preserve
5
# Required-Start: $remote_fs
6
# Required-Stop: $remote_fs
7
# Default-Start: 2 3 4 5
11
# $Id: init.d 2966 2006-08-15 05:11:48Z cph $
13
# Copyright (c) 2001 Hewlett-Packard Company
15
# This program is free software; you can redistribute it and/or modify
16
# it under the terms of the GNU General Public License as published by
17
# the Free Software Foundation; either version 2 of the License, or (at
18
# your option) any later version.
20
# This program is distributed in the hope that it will be useful, but
21
# WITHOUT ANY WARRANTY; without even the implied warranty of
22
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23
# General Public License for more details.
25
# You should have received a copy of the GNU General Public License
26
# along with this program; if not, write to the Free Software
27
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
32
OSSCTL="/usr/lib/oss-preserve/ossctl"
33
FIXED="/etc/default/oss-preserve"
34
PREVIOUS="/var/lib/oss-preserve/settings"
36
[ -x "${OSSCTL}" ] || exit 0
41
if [ -s "${FIXED}" ]; then
43
elif [ -s "${PREVIOUS}" ]; then
44
SETTINGS="${PREVIOUS}"
46
if [ -n "${SETTINGS}" ]; then
47
echo -n "Restoring OSS mixer settings..."
48
"${OSSCTL}" restore < "${SETTINGS}"
53
echo -n "Saving OSS mixer settings..."
54
"${OSSCTL}" save > "${PREVIOUS}"
62
# http://refspecs.freestandards.org/LSB_2.1.0/LSB-generic/LSB-generic/iniscrptact.html
63
# does not really specify an exit code:
67
echo "Usage: $0 {start|stop|restart|force-reload}"