de80c6
#!/bin/sh
de80c6
de80c6
# More details about systemd generator:
de80c6
# http://www.freedesktop.org/wiki/Software/systemd/Generators/
de80c6
de80c6
. /usr/lib/kdump/kdump-lib.sh
de80c6
de80c6
# If invokded with no arguments for testing purpose, output to /tmp to
de80c6
# avoid overriding the existing.
de80c6
dest_dir="/tmp"
de80c6
de80c6
if [ -n "$1" ]; then
de80c6
    dest_dir=$1
de80c6
fi
de80c6
de80c6
systemd_dir=/usr/lib/systemd/system
de80c6
kdump_wants=$dest_dir/kdump.service.wants
de80c6
de80c6
if is_ssh_dump_target; then
de80c6
    mkdir -p $kdump_wants
de80c6
    ln -sf $systemd_dir/network-online.target $kdump_wants/
de80c6
fi