diff --git a/.gitignore b/.gitignore index f9fb1b3..4455c3d 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,8 @@ /etc/apt/apt.conf.d/* !/etc/apt/apt.conf.d/90norecommend +!/etc/asound.state + !/etc/hostname !/etc/modprobe.d/ @@ -18,6 +20,8 @@ !/etc/nginx/sites-available/ +!/etc/rc.local + !/floppies/ /floppies/*/ diff --git a/etc/asound.state b/etc/asound.state new file mode 100644 index 0000000..9d5e152 --- /dev/null +++ b/etc/asound.state @@ -0,0 +1,85 @@ +state.Device { + control.1 { + iface PCM + name 'Playback Channel Map' + value.0 0 + value.1 0 + comment { + access read + type INTEGER + count 2 + range '0 - 36' + } + } + control.2 { + iface PCM + name 'Capture Channel Map' + value 0 + comment { + access read + type INTEGER + count 1 + range '0 - 36' + } + } + control.3 { + iface MIXER + name 'PCM Playback Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.4 { + iface MIXER + name 'PCM Playback Volume' + value.0 97 + value.1 97 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 151' + dbmin -2837 + dbmax -6 + dbvalue.0 -1019 + dbvalue.1 -1019 + } + } + control.5 { + iface MIXER + name 'Mic Capture Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.6 { + iface MIXER + name 'Mic Capture Volume' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 16' + dbmin 0 + dbmax 2381 + dbvalue.0 0 + } + } + control.7 { + iface MIXER + name 'Auto Gain Control' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } +} diff --git a/etc/rc.local b/etc/rc.local new file mode 100755 index 0000000..a05575f --- /dev/null +++ b/etc/rc.local @@ -0,0 +1,20 @@ +#!/bin/sh -e +# +# rc.local +# +# This script is executed at the end of each multiuser runlevel. +# Make sure that the script will "exit 0" on success or any other +# value on error. +# +# In order to enable or disable this script just change the execution +# bits. +# +# By default this script does nothing. + +/usr/bin/printf " My IP address is\033[0;31m `/sbin/ifconfig | grep "inet addr" | grep -v "127.0.0.1" | awk '{ print $2 }' | awk -F: '{ print $2 }'` \033[0m\n" > /dev/console + +# Restore audio levels +alsactl --file /etc/asound.state restore + + +exit 0