summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiancarlo Razzolini2015-07-15 00:21:53 -0300
committerGiancarlo Razzolini2015-07-15 00:21:53 -0300
commit354addb488a4cf8904fc2ee10d9148dc3ae5c372 (patch)
tree6d6a23f2c0e7a625dbf04e1626784a2a8ad9b2e0
downloadaur-354addb488a4cf8904fc2ee10d9148dc3ae5c372.tar.gz
* Initial release.
-rw-r--r--.SRCINFO16
-rw-r--r--.gitignore3
-rw-r--r--Changelog5
-rw-r--r--PKGBUILD19
-rw-r--r--mkinitcpio-netconf.install24
5 files changed, 67 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..ac16e8acb839
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = mkinitcpio-netconf
+ pkgdesc = Archlinux mkinitcpio hook for configuring early userspace networking
+ pkgver = 0.0.1
+ pkgrel = 1
+ url = https://github.com/grazzolini/mkinitcpio-netconf
+ install = mkinitcpio-netconf.install
+ changelog = Changelog
+ arch = any
+ license = BSD
+ depends = mkinitcpio-nfs-utils
+ depends = iproute2
+ source = https://github.com/grazzolini/mkinitcpio-netconf/archive/v0.0.1.tar.gz
+ sha512sums = 86a79da8994b79df34407744400a5fc125e984e7550068e176d98e1c348e3c0bed78f21e901a215c10de6eb65beac53cfdb17ee73014a7ab38ac09ce937c634c
+
+pkgname = mkinitcpio-netconf
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..86f4c3b5ebc4
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+v*.tar.gz
+mkinitcpio-netconf-*-any.pkg.tar.xz
+mkinitcpio-netconf-*.src.tar.gz
diff --git a/Changelog b/Changelog
new file mode 100644
index 000000000000..bf7f447caa91
--- /dev/null
+++ b/Changelog
@@ -0,0 +1,5 @@
+2015-07-15 Giancarlo Razzolini <grazzolini@gmail.com>
+
+ * 0.0.1 :
+ - Initial release.
+ - Right now it only support the ip= configuration mode.
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..aec79b85d3bc
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,19 @@
+# Maintainer: Giancarlo Razzolini <grazzolini@gmail.com>
+pkgname=mkinitcpio-netconf
+pkgver=0.0.1
+pkgrel=1
+pkgdesc="Archlinux mkinitcpio hook for configuring early userspace networking"
+arch=('any')
+url="https://github.com/grazzolini/mkinitcpio-netconf"
+license=('BSD')
+depends=('mkinitcpio-nfs-utils' 'iproute2')
+install=$pkgname.install
+source=($url/archive/v$pkgver.tar.gz)
+changelog='Changelog'
+sha512sums=('86a79da8994b79df34407744400a5fc125e984e7550068e176d98e1c348e3c0bed78f21e901a215c10de6eb65beac53cfdb17ee73014a7ab38ac09ce937c634c')
+
+package() {
+ install -Dm644 "$srcdir/$pkgname-$pkgver/netconf_hook" "$pkgdir/usr/lib/initcpio/hooks/netconf"
+ install -Dm644 "$srcdir/$pkgname-$pkgver/netconf_install" "$pkgdir/usr/lib/initcpio/install/netconf"
+
+}
diff --git a/mkinitcpio-netconf.install b/mkinitcpio-netconf.install
new file mode 100644
index 000000000000..c9940afc326e
--- /dev/null
+++ b/mkinitcpio-netconf.install
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+post_install() {
+ cat<<INSTALLEOF
+ This hook will parse the ip= kernel command line variable and configure any
+ interfaces specified using ipconfig found in the mkinitcpio-nfs-utils package.
+ It is meant to be used alongside other hooks that need early userspace networking
+ such as, mkinitcpio-dropbear. This hook doesn't support yet systemd enabled
+ initramfs images. To use it, add the netconf hook before any other hook that need
+ networking in "/etc/mkinitcpio.conf" and rebuild the initramfs.
+INSTALLEOF
+}
+
+post_remove() {
+ cat<<REMOVEEOF
+ Remove the "netconf" from the "HOOKS" section in "/etc/mkinitcpio.conf"
+ and rebuild the initramfs. Also, remove the ip= cmdline parameter and regenerate
+ your bootloader configuration.
+REMOVEEOF
+}
+
+post_upgrade() {
+ post_install
+}