Skip to content

Commit

Permalink
Merge pull request #334 from mariux64/add-wake
Browse files Browse the repository at this point in the history
wake: Add
  • Loading branch information
donald authored Jul 10, 2023
2 parents 9029a70 + 8648d5b commit bb559ae
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ install_data pdist/pdistd.socket "$DESTDIR$systemdunitd
install_data pdist/pdistd@.service "$DESTDIR$systemdunitdir/pdistd@.service"
install_exec pdist/pdist-bootcheck "$DESTDIR$usr_exec_prefix/libexec/pdist-bootcheck"
install_data pdist/pdist-bootcheck.service "$DESTDIR$systemdunitdir/pdist-bootcheck.service"
install_exec wakeonlan/wake "$DESTDIR$usr_bindir/wake"

postinstall
exit
9 changes: 9 additions & 0 deletions wakeonlan/wake
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#! /bin/bash

die() { echo "$*" >&2; exit 1; }
usage() { die "usage: $0 hostname"; }
(( $# == 1 )) || usage
read -r ha rest <<< "$(getent ethers $1)"
[ "$ha" ] || die "$1: hardware address unknown. Please write to helpdesk@molgen.mpg.de."
/usr/sbin/wakeonlan $ha
echo "If your machine doesn't come online in a minute, please write to helpdesk@molgen.mpg.de."

0 comments on commit bb559ae

Please sign in to comment.