Add things for network luks unlock

This commit is contained in:
moparisthebest
2016-12-02 13:28:54 -05:00
parent 6266b8dc2c
commit 2ab9a20f30
27 changed files with 5492 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
# Generated by mksrcinfo v8
# Fri Oct 21 11:22:56 UTC 2016
pkgbase = mkinitcpio-netconf
pkgdesc = Archlinux mkinitcpio hook for configuring early userspace networking
pkgver = 0.0.4
pkgrel = 2
url = https://github.com/grazzolini/mkinitcpio-netconf
changelog = Changelog
arch = any
license = BSD
depends = mkinitcpio-nfs-utils
depends = iproute2
source = mkinitcpio-netconf-0.0.4.tar.gz::https://github.com/grazzolini/mkinitcpio-netconf/archive/v0.0.4.tar.gz
sha512sums = 06ac202410964740785d2977f7918981276e10568260433436c51a1d540152cc28462e46dae6bfa31acd1fafa9ebe1e4f57ca90d7754a09ccaba142c8d48b228
pkgname = mkinitcpio-netconf

6
src/mkinitcpio-netconf/.gitignore vendored Normal file
View File

@@ -0,0 +1,6 @@
v*.tar.gz
mkinitcpio-netconf-*-any.pkg.tar.xz
mkinitcpio-netconf-*.tar.gz
develop.*
pkg/*
src/*

View File

@@ -0,0 +1,13 @@
2015-08-11 Giancarlo Razzolini <grazzolini@gmail.com>
* 0.0.2 :
- Initial support for systemd enabled initrd:
+ Check for any files ending in .initramfs in the /etc/systemd/network directory, and copies them to the initrd, and also copy and install systemd-networkd.
+ There are some caveats, specially that it won't remove any ip addresses added to the interface: https://github.com/systemd/systemd/issues/780
- Corrected the help text.
2015-07-15 Giancarlo Razzolini <grazzolini@gmail.com>
* 0.0.1 :
- Initial release.
- Right now it only support the ip= configuration mode.

View File

@@ -0,0 +1,20 @@
# Maintainer: Giancarlo Razzolini <grazzolini@gmail.com>
pkgname=mkinitcpio-netconf
pkgver=0.0.4
pkgrel=2
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=("${pkgname}-${pkgver}.tar.gz::$url/archive/v$pkgver.tar.gz")
changelog='Changelog'
sha512sums=('06ac202410964740785d2977f7918981276e10568260433436c51a1d540152cc28462e46dae6bfa31acd1fafa9ebe1e4f57ca90d7754a09ccaba142c8d48b228')
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"
install -Dm644 "$srcdir/$pkgname-$pkgver/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

View File

@@ -0,0 +1,37 @@
#!/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. There is also an optional netconf_timeout kernel
command line argument that can be used when obtaining the ip address using dhcp, so
that ipconfig will not hang forever waiting for an IP addres. You can nest multiple ip=
parameters inside a single ip= parameter, separated by : to configure multiple interfaces.
There is no limit on the number of interfaces configured, but the kernel cmdline size.
To use this hook 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() {
cat<<UPGRADEEOF
There is now an optional kernel command line parameter named netconf_timeout that
is used to pass the timeout option to ipconfig. This is means that when using
ip=dhcp as a kernel command line parameter, ipconfig will not hang forever if the
dhcp server is unavailable.
You can also now nest multiple ip= parameters inside a single ip= parameter,
separated by : to configure multiple interfaces. There is no limit on the number
of interfaces configured, but the kernel cmdline size.
UPGRADEEOF
}