From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 6FCCF1387FD for ; Mon, 9 Jun 2014 02:39:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5FED1E08BB; Mon, 9 Jun 2014 02:39:47 +0000 (UTC) Received: from mail0131.smtp25.com (mail0131.smtp25.com [75.126.84.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6D191E084A for ; Mon, 9 Jun 2014 02:39:46 +0000 (UTC) Received: from ccs.covici.com (s-out-001.smtp25.com [67.228.91.90]) by d-out-001.smtp25.com (8.14.2/8.14.2) with ESMTP id s592diEO002784 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Sun, 8 Jun 2014 22:39:45 -0400 Received: from ccs.covici.com (localhost [127.0.0.1]) by ccs.covici.com (8.14.8/8.14.8) with ESMTP id s592dhPX016367 for ; Sun, 8 Jun 2014 22:39:43 -0400 To: gentoo-user@lists.gentoo.org Subject: [gentoo-user] numlock script and systemd X-Mailer: MH-E 8.2; nmh 1.3; GNU Emacs 23.4.1 Date: Sun, 08 Jun 2014 22:39:43 -0400 Message-ID: <16364.1402281583@ccs.covici.com> From: covici@ccs.covici.com X-SpamH-OriginatingIP: 70.109.53.110 X-SpamH-Filter: d-out-001.smtp25.com-s592diEO002784 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Archives-Salt: 3f532a9b-816e-423f-af6f-8a95ca818204 X-Archives-Hash: 992b4d87b2b85b2da38bc5297f5487c2 Hi. I would like to use my /etc/init.d/numlock script with systemd, but systemctl start just says warning numlock is already starting. I thought that if a service was not there it would use something in /etc/init.d and create one, so what am I doing wrong? Here is the script ----------cut here ---------- #!/sbin/runscript # Copyright (c) 2007-2009 Roy Marples # Released under the 2-clause BSD license. description="Turns numlock on for the consoles." ttyn=${rc_tty_number:-${RC_TTY_NUMBER:-12}} depend() { need localmount keyword -openvz -prefix -vserver -lxc } _setleds() { [ -z "$1" ] && return 1 local dev=/dev/tty t= i=1 retval=0 [ -d /dev/vc ] && dev=/dev/vc/ while [ $i -le $ttyn ]; do setleds -D "$1"num < $dev$i || retval=1 : $(( i += 1 )) done return $retval } start() { ebegin "Enabling numlock on ttys" _setleds + eend $? "Failed to enable numlock" } stop() { ebegin "Disabling numlock on ttys" _setleds - eend $? "Failed to disable numlock" } ------------- cut here ---------- It does work under openrc. Thanks in advance for any suggestions. -- Your life is like a penny. You're going to lose it. The question is: How do you spend it? John Covici covici@ccs.covici.com