REDROOM
PHP 8.5.2
Path:
Logout
Edit File
Size: 1.13 KB
Close
//lib/udev/bcache-export-cached
Text
Base64
#!/bin/sh # # This program reads the bcache superblock on bcacheX slaves to extract the # dev.uuid and dev.label which refer to a specific backing device. # # It integrates with udev 'import' by writing CACHED_UUID=X and optionally # CACHED_LABEL=X for the backing device of the provided bcache device. # Ignore caching devices by skipping unless sb.version=1 # # There is 1 and only 1 backing device (slaves/*) for a bcache device. TEMPNODE=${1} # /dev/bcacheN DEVNAME=${TEMPNODE##*/} # /dev/bcacheN -> bcacheN for slave in "/sys/class/block/$DEVNAME/slaves"/*; do [ -d "$slave" ] || continue /usr/sbin/bcache-super-show "/dev/${slave##*/}" | awk '$1 == "sb.version" { sbver=$2; } $1 == "dev.uuid" { uuid=$2; } $1 == "dev.label" && $2 != "(empty)" { label=$2; } END { if (sbver == 1 && uuid) { print("CACHED_UUID=" uuid) if (label) print("CACHED_LABEL=" label) exit(0) } exit(1); }' # awk exits 0 if it found a backing device. [ $? -eq 0 ] && exit 0 done
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 2 × Files: 16
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
hwdb.d
DIR
-
drwxr-xr-x
2026-01-08 12:55:11
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
rules.d
DIR
-
drwxr-xr-x
2026-02-07 06:05:16
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ata_id
82.72 KB
lrwxr-xr-x
2025-11-25 18:16:31
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
bcache-export-cached
1.13 KB
lrwxr-xr-x
2024-04-08 15:54:26
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
bcache-register
14.30 KB
lrwxr-xr-x
2024-04-08 15:54:26
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
cdrom_id
90.72 KB
lrwxr-xr-x
2025-11-25 18:16:31
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
dmi_memory_id
86.72 KB
lrwxr-xr-x
2025-11-25 18:16:31
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
fido_id
138.73 KB
lrwxr-xr-x
2025-11-25 18:16:31
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
hdparm
1.37 KB
lrwxr-xr-x
2022-10-06 12:47:47
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
hwdb.bin
11.72 MB
lr--r--r--
2026-01-08 12:55:16
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
iocost
150.85 KB
lrwxr-xr-x
2025-11-25 18:16:31
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
kpartx_id
2.33 KB
lrwxr-xr-x
2025-07-22 15:44:15
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
mtd_probe
34.57 KB
lrwxr-xr-x
2025-11-25 18:16:31
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
probe-bcache
14.30 KB
lrwxr-xr-x
2024-04-08 15:54:26
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
scsi_id
87.23 KB
lrwxr-xr-x
2025-11-25 18:16:31
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
snappy-app-dev
18.23 KB
lrwxr-xr-x
2025-11-21 07:08:02
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
usb_modeswitch
1.53 KB
lrwxr-xr-x
2024-04-08 16:21:24
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
v4l_id
34.57 KB
lrwxr-xr-x
2025-11-25 18:16:31
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).