summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorPlaton Ryzhikov2019-01-05 11:54:31 +0300
committerPlaton Ryzhikov2019-01-05 11:54:31 +0300
commit59f527ac4f1a30d0a9efa011ad8931f1d3784af8 (patch)
tree561926c06cb8f2580934ca07c21cea1f221bbd1b
downloadaur-59f527ac4f1a30d0a9efa011ad8931f1d3784af8.tar.gz
Initial commit
-rw-r--r--.SRCINFO12
-rw-r--r--01-uuid12
-rw-r--r--PKGBUILD16
3 files changed, 40 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..5375098be538
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,12 @@
+pkgbase = smdev-uuid
+ pkgdesc = Add block devices uuids with smdev
+ pkgver = 20190105
+ pkgrel = 1
+ arch = any
+ groups = smdev-scripts
+ depends = smdev
+ source = 01-uuid
+ sha256sums = d98735779002a318752d0cc8925ed744e1aefe49107575ad0edecea18f002739
+
+pkgname = smdev-uuid
+
diff --git a/01-uuid b/01-uuid
new file mode 100644
index 000000000000..84ea86bf3f99
--- /dev/null
+++ b/01-uuid
@@ -0,0 +1,12 @@
+if [[ ($DEVTYPE=="disk" || $DEVTYPE=="partition") && $DEVNAME ]]; then
+ test -d /dev/disk || mkdir -p /dev/disk
+ export $(blkid --info -p -o udev /dev/$DEVNAME | grep UUID)
+ [ $ID_FS_UUID ] && {
+ test -d /dev/disk/by-uuid || mkdir -p /dev/disk/by-uuid
+ ln -sf /dev/$DEVNAME /dev/disk/by-uuid/$ID_FS_UUID
+ }
+ [ $ID_PART_ENTRY_UUID ] && {
+ test -d /dev/disk/by-partuuid || mkdir -p /dev/disk/by-partuuid
+ ln -sf /dev/$DEVNAME /dev/disk/by-partuuid/$ID_PART_ENTRY_UUID
+ }
+fi
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..ee142ba9365e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,16 @@
+# Maintainer: Platon Ryzhikov <ihummer63@yandex.ru>
+
+pkgname=smdev-uuid
+pkgver=20190105
+pkgrel=1
+pkgdesc="Add block devices uuids with smdev"
+arch=('any')
+licence=('MIT')
+groups=('smdev-scripts')
+depends=('smdev')
+source=("01-uuid")
+sha256sums=('d98735779002a318752d0cc8925ed744e1aefe49107575ad0edecea18f002739')
+
+package() {
+ install -m644 -D 01-uuid ${pkgdir}/etc/smdev/add/01-uuid
+}