1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 inherit eutils toolchain-funcs
8 DESCRIPTION="daemon providing access to the kernel sysrq functions via network"
9 HOMEPAGE="http://julien.danjou.info/projects/sysrqd"
10 #SRC_URI="http://julien.danjou.info/${PN}/${P}.tar.gz"
11 SRC_URI="https://dev.gentoo.org/~wschlich/src/${CATEGORY}/${PN}/${P}.tar.gz"
14 KEYWORDS="~x86 ~amd64"
21 epatch "${FILESDIR}/${PN}-config.patch"
25 $(tc-getCC) ${CFLAGS} ${LDFLAGS} -o sysrqd sysrqd.c
30 newinitd "${FILESDIR}/sysrqd.init" sysrqd
32 local bindip='127.0.0.1' secret
34 let secret=${RANDOM}*${RANDOM}*${RANDOM}*${RANDOM}
35 echo ${bindip} > sysrqd.bind
36 echo ${secret} > sysrqd.secret
38 diropts -m 0700 -o root -g root
41 insopts -m 0600 -o root -g root
45 dodoc README ChangeLog
50 elog "Be sure to change the initial secret in /etc/sysrqd/sysrqd.secret !"
51 elog "As a security precaution, sysrqd is configured to only listen on"
52 elog "127.0.0.1 by default. Change the content of /etc/sysrqd/sysrqd.bind"
53 elog "to an IPv4 address you want it to listen on or remove the file"
54 elog "to make it listen on any IP address (0.0.0.0)."