]>
git.ipfire.org Git - thirdparty/systemd.git/blob - test/units/testsuite-76.sh
2 # SPDX-License-Identifier: LGPL-2.1-or-later
6 # shellcheck source=test/units/assert.sh
7 .
"$(dirname "$0")"/assert.sh
9 export SYSTEMD_LOG_LEVEL
=debug
11 echo "foo.bar=42" >/tmp
/foo.conf
12 assert_rc
0 /usr
/lib
/systemd
/systemd-sysctl
/tmp
/foo.conf
13 assert_rc
1 /usr
/lib
/systemd
/systemd-sysctl
--strict /tmp
/foo.conf
15 echo "-foo.foo=42" >/tmp
/foo.conf
16 assert_rc
0 /usr
/lib
/systemd
/systemd-sysctl
/tmp
/foo.conf
17 assert_rc
0 /usr
/lib
/systemd
/systemd-sysctl
--strict /tmp
/foo.conf
19 if ! systemd-detect-virt
--quiet --container; then
20 ip link add hoge
type dummy
21 udevadm
wait /sys
/class
/net
/hoge
23 cat >/tmp
/foo.conf
<<EOF
24 net.ipv4.conf.*.drop_gratuitous_arp=1
25 net.ipv4.*.*.bootp_relay=1
26 net.ipv4.aaa.*.disable_policy=1
29 echo 0 >/proc
/sys
/net
/ipv
4/conf
/hoge
/drop_gratuitous_arp
30 echo 0 >/proc
/sys
/net
/ipv
4/conf
/hoge
/bootp_relay
31 echo 0 >/proc
/sys
/net
/ipv
4/conf
/hoge
/disable_policy
33 assert_rc
0 /usr
/lib
/systemd
/systemd-sysctl
--prefix=/net
/ipv
4/conf
/hoge
/tmp
/foo.conf
34 assert_eq
"$(cat /proc/sys/net/ipv4/conf/hoge/drop_gratuitous_arp)" "1"
35 assert_eq
"$(cat /proc/sys/net/ipv4/conf/hoge/bootp_relay)" "1"
36 assert_eq
"$(cat /proc/sys/net/ipv4/conf/hoge/disable_policy)" "0"