"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/lxc/cmd/lxc-checkconfig.in" between
lxc-4.0.9.tar.gz and lxc-4.0.10.tar.gz

About: LXC are userspace tools for the Linux kernel containers that let users easily create and manage system or application containers.

lxc-checkconfig.in  (lxc-4.0.9):lxc-checkconfig.in  (lxc-4.0.10)
skipping to change at line 27 skipping to change at line 27
SETCOLOR_FAILURE=":" SETCOLOR_FAILURE=":"
SETCOLOR_WARNING=":" SETCOLOR_WARNING=":"
SETCOLOR_NORMAL=":" SETCOLOR_NORMAL=":"
fi fi
is_set() { is_set() {
$CAT $CONFIG | grep "$1=[y|m]" > /dev/null $CAT $CONFIG | grep "$1=[y|m]" > /dev/null
return $? return $?
} }
is_enabled() { show_enabled() {
mandatory=$2 RES=$1
is_set $1
RES=$?
RET=1 RET=1
if [ $RES -eq 0 ]; then if [ $RES -eq 0 ]; then
$SETCOLOR_SUCCESS && echo -n "enabled" && $SETCOLOR_NORMAL $SETCOLOR_SUCCESS && echo -n "enabled" && $SETCOLOR_NORMAL
RET=0 RET=0
else else
if [ ! -z "$mandatory" ] && [ "$mandatory" = yes ]; then if [ ! -z "$mandatory" ] && [ "$mandatory" = yes ]; then
$SETCOLOR_FAILURE && echo -n "required" && $SETCOLOR_NORMAL $SETCOLOR_FAILURE && echo -n "required" && $SETCOLOR_NORMAL
else else
$SETCOLOR_WARNING && echo -n "missing" && $SETCOLOR_NORMAL $SETCOLOR_WARNING && echo -n "missing" && $SETCOLOR_NORMAL
fi fi
fi fi
return $RET return $RET
} }
is_enabled() {
mandatory=$2
is_set $1
show_enabled $?
}
has_cgroup_ns() {
mandatory=no
if [ -f "/proc/self/ns/cgroup" ]; then
show_enabled 0
else
show_enabled 1
fi
}
is_probed() { is_probed() {
lsmod | grep $1 > /dev/null lsmod | grep $1 > /dev/null
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
echo -n ", loaded" echo -n ", loaded"
else else
echo -n ", not loaded" echo -n ", not loaded"
fi fi
} }
echo "LXC version $(lxc-start --version)" echo "LXC version $(lxc-start --version)"
skipping to change at line 147 skipping to change at line 161
echo -n "Multiple /dev/pts instances: " && is_enabled DEVPTS_MULTIPLE_INS TANCES echo -n "Multiple /dev/pts instances: " && is_enabled DEVPTS_MULTIPLE_INS TANCES
echo echo
fi fi
echo echo
echo "--- Control groups ---" echo "--- Control groups ---"
echo -n "Cgroups: " && is_enabled CONFIG_CGROUPS echo -n "Cgroups: " && is_enabled CONFIG_CGROUPS
echo echo
echo -n "Cgroup namespace: " && has_cgroup_ns
echo
print_cgroups() { print_cgroups() {
# print all mountpoints for cgroup filesystems # print all mountpoints for cgroup filesystems
awk '$1 !~ /#/ && $3 == mp { print $2; } ; END { exit(0); } ' "mp=$1" "$2" ; awk '$1 !~ /#/ && $3 == mp { print $2; } ; END { exit(0); } ' "mp=$1" "$2" ;
} }
CGROUP_V1_MNTS=`print_cgroups cgroup /proc/self/mounts` CGROUP_V1_MNTS=`print_cgroups cgroup /proc/self/mounts`
echo echo
echo "Cgroup v1 mount points: " echo "Cgroup v1 mount points: "
echo "$CGROUP_V1_MNTS" echo "$CGROUP_V1_MNTS"
echo echo
skipping to change at line 182 skipping to change at line 199
echo -n "Cgroup v1 freezer controller: " echo -n "Cgroup v1 freezer controller: "
$SETCOLOR_FAILURE && echo -n "missing" && $SETCOLOR_NORMAL $SETCOLOR_FAILURE && echo -n "missing" && $SETCOLOR_NORMAL
echo echo
fi fi
CGROUP_MNT_PATH=`echo "$CGROUP_V1_MNTS" | head -n 1` CGROUP_MNT_PATH=`echo "$CGROUP_V1_MNTS" | head -n 1`
if [ -f $CGROUP_MNT_PATH/cgroup.clone_children ]; then if [ -f $CGROUP_MNT_PATH/cgroup.clone_children ]; then
echo -n "Cgroup v1 clone_children flag: " && echo -n "Cgroup v1 clone_children flag: " &&
$SETCOLOR_SUCCESS && echo "enabled" && $SETCOLOR_NORMAL $SETCOLOR_SUCCESS && echo "enabled" && $SETCOLOR_NORMAL
else else
echo -n "Cgroup namespace: " && is_enabled CONFIG_CGROUP_NS yes echo -n "Cgroup ns_cgroup: " && is_enabled CONFIG_CGROUP_NS yes
echo echo
fi fi
echo -n "Cgroup device: " && is_enabled CONFIG_CGROUP_DEVICE echo -n "Cgroup device: " && is_enabled CONFIG_CGROUP_DEVICE
echo echo
echo -n "Cgroup sched: " && is_enabled CONFIG_CGROUP_SCHED echo -n "Cgroup sched: " && is_enabled CONFIG_CGROUP_SCHED
echo echo
echo -n "Cgroup cpu account: " && is_enabled CONFIG_CGROUP_CPUACCT echo -n "Cgroup cpu account: " && is_enabled CONFIG_CGROUP_CPUACCT
 End of changes. 4 change blocks. 
6 lines changed or deleted 23 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)