diff options
author | Chris Severance | 2017-07-25 15:42:17 -0400 |
---|---|---|
committer | Chris Severance | 2017-07-25 15:42:17 -0400 |
commit | 7b69aaba89cc1c59ea21134b44f7e4630c2f236e (patch) | |
tree | cf87c3a094f48b26dfc74ad9e27c601fd73c275e /PKGBUILD | |
download | aur-7b69aaba89cc1c59ea21134b44f7e4630c2f236e.tar.gz |
Initial Import
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..b6c8deaacf57 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,38 @@ +# Maintainer: Chris Severance aur.severach aATt spamgourmet dott com +# Contributor: Allan McRae <allan@archlinux.org> + +# This should be built in. + +set -u +pkgname='pacman-sync' +pkgver='1.0.0' +pkgrel='1' +pkgdesc='alpm hook to sync after pacman installs to prevent corruption from using a flash disk or reboot to kernel crash' +arch=('any') +url='https://www.archlinux.org/pacman/alpm-hooks.5.html' +license=('GPL') +depends=('pacman') + +package() { + set -u + install -Dm644 <(cat << EOF +# Force disks to sync to reduce the risk of data corruption + +[Trigger] +Operation = Install +Operation = Upgrade +Operation = Remove +Type = Package +Target = * + +[Action] +Description = sync all file systems +Depends = coreutils +When = PostTransaction +Exec = /usr/bin/sync +EOF + ) "${pkgdir}/usr/share/libalpm/hooks/zzz_sync.hook" + ln -s 'zzz_sync.hook' "${pkgdir}/usr/share/libalpm/hooks/00_sync.hook" + set +u +} +set +u |