Snippets

Doug Freed StackScript Wrapper

Created by Doug Freed last modified
#!/bin/bash

CONSOLE=/dev/console

for arg
do
  if echo "$arg" | grep -q -e tty0 -e tty1 -e hvc0 ; then
        CONSOLE="/dev/$arg"
  fi
done

exec 0<$CONSOLE
exec 1>$CONSOLE
exec 2>$CONSOLE

sleep 2
clear
echo Welcome to StackScripts.  Starting up...
sleep 2
echo
echo
env -i HOME=/root TERM=$TERM PATH=$PATH LINODE_LISHUSERNAME=$self->{username} LINODE_DATACENTERID=$DataCenterID LINODE_RAM=$self->{TotalRAM} LINODE_ID=$self->{LinodeID} <StackScript UDF parameters as environment variables> /root/StackScript
rm $gettyPath
mv /sbin/.getty $gettyPath

Comments (1)

  1. Linda Melson
HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.