Permalink
Browse files

Fixing whitespace

  • Loading branch information...
1 parent 0386e41 commit 9abcdbf595168915fa4ce8f1f1edf9c70a3daaf0 Trevor O committed Mar 27, 2012
Showing with 29 additions and 29 deletions.
  1. +15 −15 src/linux/lib/smartdc/mdata-get
  2. +14 −14 src/linux/lib/smartdc/prepare-image
@@ -30,15 +30,15 @@ case $(uname -s) in
SERIAL_DEV="/dev/ttyS1"
;;
FreeBSD)
- SERIAL_DEV="/dev/cuau1"
- ;;
+ SERIAL_DEV="/dev/cuau1"
+ ;;
SunOS)
- NC_SOCK="/var/run/smartdc/metadata.sock"
- DISABLE_ECHO="no"
- ;;
+ NC_SOCK="/var/run/smartdc/metadata.sock"
+ DISABLE_ECHO="no"
+ ;;
*)
- echo "Don't know which serial to use for $(uname -s)" >&2
- exit 3
+ echo "Don't know which serial to use for $(uname -s)" >&2
+ exit 3
;;
esac
@@ -64,19 +64,19 @@ while [[ ${keep_trying} -eq 1 ]]; do
read -t ${TIMEOUT} status
retval=$?
if [[ ${retval} -gt 128 ]]; then
- echo "mdata-get: timeout getting status. (exit code: ${retval})" >&2
- continue
+ echo "mdata-get: timeout getting status. (exit code: ${retval})" >&2
+ continue
elif [[ ${retval} -ne 0 ]]; then
- echo "mdata-get: failed to read data from metadata agent. (exit code: ${retval})" >&2
- exit 2
+ echo "mdata-get: failed to read data from metadata agent. (exit code: ${retval})" >&2
+ exit 2
fi
if [[ ${status} == "NOTFOUND" ]]; then
- echo "No metadata for ${key}"
- exit 1
+ echo "No metadata for ${key}"
+ exit 1
elif [[ ${status} != "SUCCESS" ]]; then
- echo "Error getting metadata for key ${key}: ${status}"
- exit 2
+ echo "Error getting metadata for key ${key}: ${status}"
+ exit 2
fi
while read -t ${TIMEOUT} line; do
@@ -35,13 +35,13 @@ check_root() {
}
check_selinux() {
- if [[ -f /etc/selinux/config ]] ; then
- local mode=$(grep '^SELINUX=' /etc/selinux/config | awk -F'=' '{print $2}')
- if [[ "${mode}" != "disabled" ]] ; then
- addwarn "Selinux is not disabled. Do you also juggle chainsaws?"
- addwarn "To disable set SELINUX=disabled in /etc/selinux/config"
- fi
- fi
+ if [[ -f /etc/selinux/config ]] ; then
+ local mode=$(grep '^SELINUX=' /etc/selinux/config | awk -F'=' '{print $2}')
+ if [[ "${mode}" != "disabled" ]] ; then
+ addwarn "Selinux is not disabled. Do you also juggle chainsaws?"
+ addwarn "To disable set SELINUX=disabled in /etc/selinux/config"
+ fi
+ fi
}
cleanup_logs() {
@@ -68,8 +68,8 @@ cleanup_ssh() {
}
cleanup_disks() {
- info "removing /dev/vdb entries from fstab"
- sed -i '/^\/dev\/vdb/d' /etc/fstab
+ info "removing /dev/vdb entries from fstab"
+ sed -i '/^\/dev\/vdb/d' /etc/fstab
}
cleanup_metadata() {
@@ -83,9 +83,9 @@ prepare_redhat() {
info "cleaning up network devices"
rm -f /etc/udev/rules.d/70-persistent-net.rules
- rm -f /lib/udev/rules.d/70-persistent-net-generator.rules
+ rm -f /lib/udev/rules.d/70-persistent-net-generator.rules
- find /etc/sysconfig/network-scripts -name "ifcfg-eth*" | xargs rm -f
+ find /etc/sysconfig/network-scripts -name "ifcfg-eth*" | xargs rm -f
find /var/lib/dhclient -type f | xargs rm -f
info "cleaning up package cache"
@@ -116,8 +116,8 @@ prepare_redhat() {
prepare_debian() {
info "cleaning up network devices"
- rm -f /etc/udev/rules.d/70-persistent-net.rules
- rm -f /lib/udev/rules.d/70-persistent-net-generator.rules
+ rm -f /etc/udev/rules.d/70-persistent-net.rules
+ rm -f /lib/udev/rules.d/70-persistent-net-generator.rules
if [[ -d /var/lib/dhcp3 ]] ; then
find /var/lib/dhcp3 -type f -name "*.leases" | xargs rm -f
@@ -127,7 +127,7 @@ prepare_debian() {
if [[ -f /etc/network/interfaces ]] ; then
rm -f /etc/network/interfaces
- out=$(dpkg-reconfigure ifupdown 2>&1 > /dev/null)
+ out=$(dpkg-reconfigure ifupdown 2>&1 > /dev/null)
echo "" >> /etc/network/interfaces
echo "auto eth0" >> /etc/network/interfaces
echo "iface eth0 inet dhcp" >> /etc/network/interfaces

0 comments on commit 9abcdbf

Please sign in to comment.