Skip to content

Commit

Permalink
Get rid of local hacks, add postinst that recreates initramfs
Browse files Browse the repository at this point in the history
  • Loading branch information
tfheen committed Mar 13, 2011
1 parent b28dd07 commit e0ad63d
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
6 changes: 6 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,9 @@

%:
dh $@

override_dh_install:
dh_install
install -D -o root -g root -m755 hook debian/ykfde/usr/share/initramfs-tools/hooks/ykfde
install -D -o root -g root -m755 script debian/ykfde/usr/share/initramfs-tools/scripts/local-top/ykfde
install -D -o root -g root -m755 helper debian/ykfde/usr/share/ykfde/ykfde-keyscript
21 changes: 21 additions & 0 deletions debian/ykfde.postinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#! /bin/sh

set -e

case "$1" in
configure)
if [ -x /usr/sbin/update-initramfs ]; then
update-initramfs -u
fi
;;
abort-upgrade|abort-remove|abort-deconfigure)

;;

*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac

#DEBHELPER#
6 changes: 2 additions & 4 deletions hook
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ esac
. /usr/share/initramfs-tools/hook-functions

copy_exec /usr/bin/ykchalresp
cat > ${DESTDIR}/etc/yubikey-challenge <<EOF
f5ef03d4-9148-452d-99f0-4ad09d73e234
EOF
cp /home/tfheen/src/ykfde/helper "${DESTDIR}/sbin/ykfde-keyscript"
cp /boot/yubikey-challenge "${DESTDIR}/etc/yubikey-challenge"
cp /usr/share/ykfde/ykfde-keyscript "${DESTDIR}/sbin/ykfde-keyscript"
exit 0

0 comments on commit e0ad63d

Please sign in to comment.