summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD19
-rw-r--r--numlock_hook9
-rw-r--r--numlock_install14
4 files changed, 58 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..f08bea0ea868
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = mkinitcpio-numlock
+ pkgdesc = Enable numlock in early userspace
+ pkgver = 1.0.3
+ pkgrel = 1
+ url = https://bbs.archlinux.org/viewtopic.php?pid=869618
+ arch = any
+ license = GPL
+ depends = mkinitcpio
+ depends = kbd
+ source = numlock_hook
+ source = numlock_install
+ sha512sums = f623a8e6b015b9a798c4bec2ec90c2638b6c966e82be8910601cdaabe3660f05d3ca3e531d2a8ba747b053631f073a6e90c4eb2c9c04f39b84b7f7c8014696ea
+ sha512sums = 65f21cbe70e11df366779fdd135c662fbc4cc1511d527294f7af590fa5d6a9004d6d9f9e706560dfe1a859088e85850c98a8431881da91d560002a3ce7ef114f
+
+pkgname = mkinitcpio-numlock
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..7da655731b35
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,19 @@
+# Maintainer: Matej Groma <matejgroma@gmail.com>
+# Contributor: Jordi De Groof <jordi.degroof@gmail.com>
+
+pkgname=mkinitcpio-numlock
+pkgver=1.0.3
+pkgrel=1
+pkgdesc="Enable numlock in early userspace"
+arch=('any')
+url="https://bbs.archlinux.org/viewtopic.php?pid=869618"
+license=('GPL')
+depends=('mkinitcpio' 'kbd')
+source=(numlock_hook numlock_install)
+sha512sums=('f623a8e6b015b9a798c4bec2ec90c2638b6c966e82be8910601cdaabe3660f05d3ca3e531d2a8ba747b053631f073a6e90c4eb2c9c04f39b84b7f7c8014696ea'
+ '65f21cbe70e11df366779fdd135c662fbc4cc1511d527294f7af590fa5d6a9004d6d9f9e706560dfe1a859088e85850c98a8431881da91d560002a3ce7ef114f')
+
+package() {
+ install -o root -g root -m 644 -D ${srcdir}/numlock_hook ${pkgdir}/usr/lib/initcpio/hooks/numlock
+ install -o root -g root -m 644 -D ${srcdir}/numlock_install ${pkgdir}/usr/lib/initcpio/install/numlock
+}
diff --git a/numlock_hook b/numlock_hook
new file mode 100644
index 000000000000..04991283c714
--- /dev/null
+++ b/numlock_hook
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+run_hook ()
+{
+ INITTY=/dev/tty[1-6]
+ for tty in $INITTY; do
+ /usr/bin/setleds -D +num < $tty
+ done
+}
diff --git a/numlock_install b/numlock_install
new file mode 100644
index 000000000000..852266082ed2
--- /dev/null
+++ b/numlock_install
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+build()
+{
+ add_binary /usr/bin/setleds
+ add_runscript
+}
+
+help ()
+{
+cat <<HELPEOF
+ This hook enables numlock in early userspace.
+HELPEOF
+}