Codebase list amazon-ec2-utils / run/5c2b5f8c-0f41-42ba-8803-3b6f240a19e1/main ec2udev-vbd
run/5c2b5f8c-0f41-42ba-8803-3b6f240a19e1/main

Tree @run/5c2b5f8c-0f41-42ba-8803-3b6f240a19e1/main (Download .tar.gz)

ec2udev-vbd @run/5c2b5f8c-0f41-42ba-8803-3b6f240a19e1/mainraw · history · blame

#!/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