generic/228: fix restoration of kernel.core_pattern sysctl

generic/228 changes kernel.core_pattern, so it saves it beforehand in
order to restore it. However, it adds an extra space in the process:

$ echo \"$(sysctl kernel.core_pattern | awk -F = '{print $NF}')\"
" |/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h %e"

Instead of using awk, just use sysctl -n to only print the value.

Signed-off-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
1 file changed