summaryrefslogtreecommitdiff
path: root/data/live-build-config/hooks/live/08-sysconf.chroot
blob: aac175859934bc46343fbc926ca0b885651471c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/sh

cp -f /opt/vyatta/etc/default_ssh /etc/default/ssh
>/etc/pam_radius_auth.conf

update_sysctl_conf ()
{
    var=$1
    val=$2
    comment=$3
    sysctl_conf=/etc/sysctl.conf

    if grep -q "^${var}[[:space:]]*=" $sysctl_conf ; then
	sed -i "/^${var}[[:space:]]*=/ s,=.*,= ${val}," $sysctl_conf
    elif grep -q "^#[[:space:]]*${var}[[:space:]]*=" $sysctl_conf ; then
	sed -i "/^#[[:space:]]*${var}[[:space:]]*=/ { s,^#[[:space:]]*,, ; s,[[:space:]]*=.*, = ${val},} " $sysctl_conf
    else
	cat <<-EOF >> $sysctl_conf

	# $comment
	$var = $val
	EOF
    fi
}

update_sysctl_conf kernel.printk "4 4 1 7" \
    "the following stops low-level messages on console"

# Local Variables:
# mode: shell-script
# sh-indentation: 4
# End: