File: ec2udev-vbd

package info (click to toggle)
amazon-ec2-utils 1.3%2Bgit20200518-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 216 kB
  • sloc: sh: 207; python: 130; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 485 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash

# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the MIT License. See the LICENSE accompanying this file
# for the specific language governing permissions and limitations under
# the License.

# Maintain consistent naming scheme with current EC2 instances
if [ "$#" -ne 1 ] ; then
  echo "$0 <device>" >&2
  exit 1
else
  if echo "$1"|grep -qE 'xvd[a-z][0-9]?' ; then
    echo "$1" | sed -e 's/xvd/sd/'
  else
    echo "$1"
  fi
fi