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