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