From: Kay Sievers Date: Thu, 26 Jun 2008 11:25:31 +0000 (+0200) Subject: path_id: suppress trailing '-' like 'ID_PATH=pci-0000:05:01.0-' X-Git-Tag: 174~1678 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dad1f0924be4ccd7e09ac59237b05ccc354ceb1d;p=systemd path_id: suppress trailing '-' like 'ID_PATH=pci-0000:05:01.0-' --- diff --git a/extras/path_id/path_id b/extras/path_id/path_id index 7a377002..0fad30cf 100755 --- a/extras/path_id/path_id +++ b/extras/path_id/path_id @@ -95,7 +95,11 @@ handle_pci () { ;; esac done - d="pci-$pci_id-$d" + if [ "$d" ]; then + d="pci-$pci_id-$d" + else + d="pci-$pci_id" + fi D="$host_dev_path" RESULT=0 }