[Eisfair] udev-Regel nach SCSI-ID
Marcus Roeckrath
marcus.roeckrath at gmx.de
Di Aug 29 19:33:26 CEST 2017
Hallo Detlef,
Detlef Paschke wrote:
> So, nun wurde auch eine log erstellt. Inhalt derzeit:
>
> pci-0000:03:02.0-scsi-0:0:3:0
> pci-0000:03:02.0-scsi-0:0:0:0
> pci-0000:03:02.0-scsi-0:0:1:0
> pci-0000:03:02.0-scsi-0:0:0:0
> pci-0000:03:02.0-scsi-0:0:2:0
> pci-0000:04:01.0-scsi-0:0:0:0
> pci-0000:03:02.0-scsi-0:0:4:0
> pci-0000:03:02.0-scsi-0:0:0:0
>
> Udevadm sagt aber -gekürzt - folgendes:
>
> PROGRAM '/root/udevtest.sh pci-0000:03:02.0-scsi-0:0:4:0'
> /etc/udev/rules.d/10-backplane.rules:30
> starting '/root/udevtest.sh pci-0000:03:02.0-scsi-0:0:4:0'
> '/root/udevtest.sh pci-0000:03:02.0-scsi-0:0:4:0'(err)
> '/root/udevtest.sh: line 3: ${$1}: bad substitution'
> '/root/udevtest.sh pci-0000:03:02.0-scsi-0:0:4:0'(err)
> '/root/udevtest.sh: line 4: ${$1}: bad substitution'
> '/root/udevtest.sh pci-0000:03:02.0-scsi-0:0:4:0' [29881] exit with
> return code 0
Hatte noch Typos drin:
(echo "${1}" ; echo "${1}" | cut -d "-" -f 4) >> /tmp/udevtest.log
echo "${1}" | cut -d "-" -f 4
Da war zweimal ein ${$1], was ${1} heißen muss.
--
Gruss Marcus
Mehr Informationen über die Mailingliste Eisfair