From 99f3c72fc27aa50b53c76c9c1dd5a32f39f7fc7d Mon Sep 17 00:00:00 2001 From: ms Date: Mon, 18 Jun 2007 20:20:21 +0000 Subject: [PATCH] Ein Alsa-Initscript gebaut, was beim Herunterfahren die Lautstaerke speichert. git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@636 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8 --- config/rootfiles/common/misc-progs | 1 - config/rootfiles/common/stage2 | 1 + doc/language_issues.de | 1 + doc/language_issues.en | 1 + lfs/stage2 | 3 +++ src/initscripts/init.d/alsa | 24 ++++++++++++++++++++++++ src/misc-progs/ipsecctrl.c | 10 +++++----- src/paks/alsa/install.sh | 3 +++ src/paks/alsa/uninstall.sh | 1 + 9 files changed, 39 insertions(+), 6 deletions(-) create mode 100644 src/initscripts/init.d/alsa diff --git a/config/rootfiles/common/misc-progs b/config/rootfiles/common/misc-progs index a1fdbea2af..fb7acbf75e 100644 --- a/config/rootfiles/common/misc-progs +++ b/config/rootfiles/common/misc-progs @@ -11,7 +11,6 @@ usr/local/bin/outgoingfwctrl usr/local/bin/qosctrl usr/local/bin/rebuildhosts usr/local/bin/redctrl -usr/local/bin/monitorTraff usr/local/bin/pakfire usr/local/bin/restartssh usr/local/bin/restartsyslogd diff --git a/config/rootfiles/common/stage2 b/config/rootfiles/common/stage2 index 7bda0914c2..5213102a1e 100644 --- a/config/rootfiles/common/stage2 +++ b/config/rootfiles/common/stage2 @@ -43,6 +43,7 @@ media/floppy mnt #opt #root +root/ipfire #sbin #srv #sys diff --git a/doc/language_issues.de b/doc/language_issues.de index 5621761737..9487471b40 100644 --- a/doc/language_issues.de +++ b/doc/language_issues.de @@ -53,6 +53,7 @@ WARNING: translation string unused: backup password WARNING: translation string unused: backup sets WARNING: translation string unused: backup to floppy WARNING: translation string unused: bad characters in +WARNING: translation string unused: bleeding rules WARNING: translation string unused: blue access use hint WARNING: translation string unused: blue interface WARNING: translation string unused: buffered memory diff --git a/doc/language_issues.en b/doc/language_issues.en index 7b48a71f22..de7c39f0d6 100644 --- a/doc/language_issues.en +++ b/doc/language_issues.en @@ -70,6 +70,7 @@ WARNING: translation string unused: backup sets WARNING: translation string unused: backup to floppy WARNING: translation string unused: bewan adsl pci st WARNING: translation string unused: bewan adsl usb +WARNING: translation string unused: bleeding rules WARNING: translation string unused: blue interface WARNING: translation string unused: buffered memory WARNING: translation string unused: bytes per second diff --git a/lfs/stage2 b/lfs/stage2 index cd9cc281a4..5a83896052 100644 --- a/lfs/stage2 +++ b/lfs/stage2 @@ -106,5 +106,8 @@ $(TARGET) : # Permissions chmod 0711 /var/empty + + # A small hack to include /root to the iso but not all of it's files. + touch /root/ipfire @$(POSTBUILD) diff --git a/src/initscripts/init.d/alsa b/src/initscripts/init.d/alsa new file mode 100644 index 0000000000..fe7077ad5e --- /dev/null +++ b/src/initscripts/init.d/alsa @@ -0,0 +1,24 @@ +#!/bin/sh +# Begin $rc_base/init.d/alsa + +# Based on sysklogd script from LFS-3.1 and earlier. +# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org +# ALSA specific parts by Mark Hymers - markh@linuxfromscratch.org +# Stores mixer settings in the default location: /etc/asound.state + +. /etc/sysconfig/rc +. $rc_functions + +case "$1" in + stop) + boot_mesg "Stopping ALSA... Saving volumes..." + loadproc /usr/sbin/alsactl store + ;; + + *) + echo "Usage: $0 stop" + exit 1 + ;; +esac + +# End $rc_base/init.d/alsa diff --git a/src/misc-progs/ipsecctrl.c b/src/misc-progs/ipsecctrl.c index 299264728a..1aa74ccc00 100644 --- a/src/misc-progs/ipsecctrl.c +++ b/src/misc-progs/ipsecctrl.c @@ -121,7 +121,7 @@ void add_alias_interfaces(char *configtype, /* Check for CONFIG_TYPE=2 or 3 i.e. RED ethernet present. If not, * exit gracefully. This is not an error... */ - if (!((strcmp(configtype, "2")==0) || (strcmp(configtype, "3")==0) || (strcmp(configtype, "6")==0) || (strcmp(configtype, "7")==0))) + if (!((strcmp(configtype, "1")==0) || (strcmp(configtype, "2")==0) || (strcmp(configtype, "3")==0) || (strcmp(configtype, "4")==0))) return; /* Now check the RED_TYPE - aliases only work with STATIC. */ @@ -286,7 +286,7 @@ int main(int argc, char *argv[]) { /* handle operations that doesn't need start the ipsec system */ if (argc == 2) { if (strcmp(argv[1], "D") == 0) { - safe_system("/usr/local/bin/vpn-watch --stop"); + safe_system("kill -9 $(cat /var/run/vpn-watch.pid)"); ipsec_norules(); /* Only shutdown pluto if it really is running */ int fd; @@ -305,7 +305,7 @@ int main(int argc, char *argv[]) { } /* stop the watch script as soon as possible */ - safe_system("/usr/local/bin/vpn-watch --stop"); + safe_system("kill -9 $(cat /var/run/vpn-watch.pid)"); /* clear iptables vpn rules */ ipsec_norules(); @@ -443,7 +443,7 @@ int main(int argc, char *argv[]) { safe_system("/usr/sbin/ipsec tncfg --clear >/dev/null"); safe_system("/etc/rc.d/init.d/ipsec restart >/dev/null"); add_alias_interfaces(configtype, redtype, if_red, (enable_red+enable_green+enable_orange+enable_blue) >>1 ); - safe_system("/usr/local/bin/vpn-watch --start"); + safe_system("/usr/local/bin/vpn-watch &"); exit(0); } @@ -494,6 +494,6 @@ int main(int argc, char *argv[]) { } } fclose(file); - safe_system("/usr/local/bin/vpn-watch --start"); + safe_system("/usr/local/bin/vpn-watch &"); return 0; } diff --git a/src/paks/alsa/install.sh b/src/paks/alsa/install.sh index ace14baf9c..26356a498e 100644 --- a/src/paks/alsa/install.sh +++ b/src/paks/alsa/install.sh @@ -1 +1,4 @@ tar xvfj files.tbz2 -C / +touch /etc/asound.state +ln -sf ../init.d/alsa /etc/rc.d/rc0.d/K35alsa +ln -sf ../init.d/alsa /etc/rc.d/rc6.d/K35alsa diff --git a/src/paks/alsa/uninstall.sh b/src/paks/alsa/uninstall.sh index e69de29bb2..acb436b73b 100644 --- a/src/paks/alsa/uninstall.sh +++ b/src/paks/alsa/uninstall.sh @@ -0,0 +1 @@ +rm -rf /etc/rc.d/rc*.d/*alsa -- 2.39.2