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