This file is indexed.

/lib/live/debconfig/0070-procps is in live-debconfig 4.0~alpha31-1.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

  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
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
#!/bin/sh

## live-debconfig(7) - System Configuration Components
## Copyright (C) 2006-2013 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
## This is free software, and you are welcome to redistribute it
## under certain conditions; see COPYING for details.


set -e

DEBCONF_SYSTEMRC="/var/lib/live/debconfig/systemrc"
export DEBCONF_SYSTEMRC

. /usr/share/debconf/confmodule

Defaults ()
{
	if [ -z "${_NET_IPV4_IP_FORWARD}" ]
	then
		if [ -e /etc/sysctl.d/net.ipv4.ip_forward.conf ]
		then
			_NET_IPV4_IP_FORWARD="$(grep '^ *net.ipv4.ip_forward' /etc/sysctl.d/net.ipv4.ip_forward.conf | sed -e 's|.*=* ||')"
		fi

		_NET_IPV4_IP_FORWARD="${_NET_IPV4_IP_FORWARD:-0}"
	fi

	if [ -z "${_VM_SWAPPINESS}" ]
	then
		if [ -e /etc/sysctl.d/vm.swappiness.conf ]
		then
			_VM_SWAPPINESS="$(grep '^ *vm.swappiness' /etc/sysctl.d/vm.swappiness.conf | sed -e 's|.*=* ||')"
		fi

		_VM_SWAPPINESS="${_VM_SWAPPINESS:-60}"
	fi
}

db_get live-debconfig/procps/net.ipv4.ip_forward
_NET_IPV4_IP_FORWARD="${RET}" # string w/

db_get live-debconfig/procps/vm.swappiness
_VM_SWAPPINESS="${RET}" # string w/

Defaults

db_set live-debconfig/procps/net.ipv4.ip_forward "${_NET_IPV4_IP_FORWARD}"
db_fset live-debconfig/procps/net.ipv4.ip_forward seen false

db_settitle live-debconfig/title
db_input high live-debconfig/procps/net.ipv4.ip_forward || true
db_go

db_get live-debconfig/procps/net.ipv4.ip_forward
_NET_IPV4_IP_FORWARD="${RET}" # string w/

db_set live-debconfig/procps/vm.swappiness "${_VM_SWAPPINESS}"
db_fset live-debconfig/procps/vm.swappiness seen false

db_settitle live-debconfig/title
db_input high live-debconfig/procps/vm.swappiness || true
db_go

db_get live-debconfig/procps/vm.swappiness
_VM_SWAPPINESS="${RET}" # string w/

Defaults

db_stop

# translate debconf boolean into 'yes' and 'no'
# (this is better than using a select in debconf with Choices-C,
# otherwise all translators would need to translate 'yes' and 'no').
case "${_NET_IPV4_IP_FORWARD}" in
	true)
		_NET_IPV4_IP_FORWARD="1"
		;;

	false)
		_NET_IPV4_IP_FORWARD="0"
		;;
esac

# Set the net.ipv4.ip_forward parameters
if [ -e /etc/sysctl.d/net.ipv4.ip_forward.conf ]
then
	cp /etc/sysctl.d/net.ipv4.ip_forward.conf /etc/sysctl.d/net.ipv4.ip_forward.conf.tmp
else
	mkdir -p /etc/sysctl.d
	touch /etc/sysctl.d/net.ipv4.ip_forward.conf.tmp
fi

grep -Eq '^ *net.ipv4.ip_forward' /etc/sysctl.d/net.ipv4.ip_forward.conf.tmp || \
	echo "net.ipv4.ip_forward" >> /etc/sysctl.d/net.ipv4.ip_forward.conf.tmp

sed -i -e "s|^ *net.ipv4.ip_forward.*|net.ipv4.ip_forward = ${_NET_IPV4_IP_FORWARD}|" \
	/etc/sysctl.d/net.ipv4.ip_forward.conf.tmp

mv /etc/sysctl.d/net.ipv4.ip_forward.conf.tmp /etc/sysctl.d/net.ipv4.ip_forward.conf

# Set the vm.swappiness
if [ -e /etc/sysctl.d/vm.swappiness.conf ]
then
	cp /etc/sysctl.d/vm.swappiness.conf /etc/sysctl.d/vm.swappiness.conf.tmp
else
	mkdir -p /etc/sysctl.d
	touch /etc/sysctl.d/vm.swappiness.conf.tmp
fi

grep -Eq '^ *vm.swappiness' /etc/sysctl.d/vm.swappiness.conf.tmp || \
	echo "vm.swappiness" >> /etc/sysctl.d/vm.swappiness.conf.tmp

sed -i -e "s|^ *vm.swappiness.*|vm.swappiness = ${_VM_SWAPPINESS}|" \
	/etc/sysctl.d/vm.swappiness.conf.tmp

mv /etc/sysctl.d/vm.swappiness.conf.tmp /etc/sysctl.d/vm.swappiness.conf