diff options
author | Christian Hesse | 2015-06-30 09:51:35 +0200 |
---|---|---|
committer | Christian Hesse | 2015-06-30 09:51:35 +0200 |
commit | 45c1b7aab8c1a46b8bfc851f2f75fe6f17c4beee (patch) | |
tree | 36ca4d3d39c5626400769b00809a47582b6dd745 | |
download | aur-45c1b7aab8c1a46b8bfc851f2f75fe6f17c4beee.tar.gz |
initial import of mkinitcpio-passwd 0.1.0.r1.gf26e054-1
-rw-r--r-- | .SRCINFO | 14 | ||||
-rw-r--r-- | PKGBUILD | 31 | ||||
-rw-r--r-- | mkinitcpio-passwd.install | 13 |
3 files changed, 58 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..370e0a605ba2 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,14 @@ +pkgbase = mkinitcpio-passwd + pkgdesc = Set password for main system inside initrd + pkgver = 0.1.0.r1.gf26e054 + pkgrel = 1 + url = https://github.com/eworm-de/mkinitcpio-passwd + install = mkinitcpio-passwd.install + arch = any + license = GPL + makedepends = git + source = git://github.com/eworm-de/mkinitcpio-passwd.git + sha256sums = SKIP + +pkgname = mkinitcpio-passwd + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..6546f444b2ab --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,31 @@ +# Maintainer: Christian Hesse <mail@eworm.de> + +pkgname=mkinitcpio-passwd +pkgver=0.1.0.r1.gf26e054 +pkgrel=1 +pkgdesc='Set password for main system inside initrd' +arch=('any') +makedepends=('git') +url='https://github.com/eworm-de/mkinitcpio-passwd' +license=('GPL') +install=mkinitcpio-passwd.install +source=('git://github.com/eworm-de/mkinitcpio-passwd.git') +sha256sums=('SKIP') + +pkgver() { + cd mkinitcpio-passwd/ + + if GITTAG="$(git describe --abbrev=0 --tags 2>/dev/null)"; then + echo "$(sed -e "s/^${pkgname%%-git}//" -e 's/^[-_/a-zA-Z]\+//' -e 's/[-_+]/./g' <<< ${GITTAG}).r$(git rev-list --count ${GITTAG}..).g$(git log -1 --format="%h")" + else + echo "0.r$(git rev-list --count master).g$(git log -1 --format="%h")" + fi +} + +package() { + cd mkinitcpio-passwd/ + + install -D -m0644 hook/passwd ${pkgdir}/usr/lib/initcpio/hooks/passwd + install -D -m0644 install/passwd ${pkgdir}/usr/lib/initcpio/install/passwd +} + diff --git a/mkinitcpio-passwd.install b/mkinitcpio-passwd.install new file mode 100644 index 000000000000..199664729710 --- /dev/null +++ b/mkinitcpio-passwd.install @@ -0,0 +1,13 @@ +#!/bin/sh + +post_install() { + echo " > Now add 'passwd' to your HOOKS array in /etc/mkinitcpio.conf" + echo " > and rebuild initial ramdisk." + echo " > You can then set password with password=user:password or" + echo " > pwhash=user:passwordhash" + echo " > Add secure shell authorized key with authorized_key=user:type:key" +} + +post_remove() { + sed -i "/^HOOKS=/s/passwd//" /etc/mkinitcpio.conf +} |