mirror of
https://codeberg.org/wonky/udev-usb-sync.git
synced 2024-09-19 23:30:37 +02:00
initial commit
This commit is contained in:
commit
28459b2d92
3 changed files with 33 additions and 0 deletions
13
.SRCINFO
Normal file
13
.SRCINFO
Normal file
|
@ -0,0 +1,13 @@
|
|||
pkgbase = udev-usb-sync
|
||||
pkgdesc = Disable writecache when USB storage device is plugged
|
||||
pkgver = 0.1
|
||||
pkgrel = 1
|
||||
url = https://codeberg.org/wonky/udev-usb-sync
|
||||
arch = any
|
||||
license = MIT
|
||||
depends = hdparm
|
||||
provides = udev-usb-sync
|
||||
source = 99-usb-sync.rules
|
||||
sha256sums = ed0253bbbd5b64529efd752978ba17176e3ff23d3f7f220bbacd3fa3a3691df9
|
||||
|
||||
pkgname = udev-usb-sync
|
3
99-usb-sync.rules
Normal file
3
99-usb-sync.rules
Normal file
|
@ -0,0 +1,3 @@
|
|||
# rule to disable write cache for usb storage
|
||||
# requires hdparm to be installed
|
||||
ACTION=="add|change", KERNEL=="sd[a-z]", ENV{ID_USB_TYPE}=="disk", RUN+="/usr/bin/hdparm -W 0 /dev/%k"
|
17
PKGBUILD
Normal file
17
PKGBUILD
Normal file
|
@ -0,0 +1,17 @@
|
|||
# Maintainer:
|
||||
pkgname='udev-usb-sync'
|
||||
pkgver=0.1
|
||||
pkgrel=1
|
||||
pkgdesc='Disable writecache when USB storage device is plugged'
|
||||
arch=('any')
|
||||
url='https://codeberg.org/wonky/udev-usb-sync'
|
||||
license=('MIT')
|
||||
depends=('hdparm')
|
||||
provides=("${pkgname}")
|
||||
source=('99-usb-sync.rules')
|
||||
sha256sums=('ed0253bbbd5b64529efd752978ba17176e3ff23d3f7f220bbacd3fa3a3691df9')
|
||||
|
||||
package() {
|
||||
install -d -m755 $pkgdir/etc/udev/rules.d
|
||||
cp ${startdir}/99-usb-sync.rules "${pkgdir}/etc/udev/rules.d"
|
||||
}
|
Loading…
Reference in a new issue