#!/bin/bash # # ### BEGIN INIT INFO # Provides: fastart # Required-Start: # Required-Stop: # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Flash Accel Management Console Setup ### END INIT INFO PATH=/sbin:/bin:/usr/bin:/usr/sbin # Source function library. . /lib/lsb/init-functions status=0 # # Start Method. # fa_start_func() { # See if the vapp package was deposited if [ -e /usr/share/debian-pkgs/flashaccel-vapp*.deb ] then # Install VAPP package dpkg -i /usr/share/debian-pkgs/flashaccel-vapp*.deb else # The rest of this script depends on the vapp-pkg being installed exit 1 fi # Execute post-install on first boot /usr/share/vapp/scripts/firstboot.sh # Verify that network is up and working properly /usr/share/vapp/scripts/bootNetworkConfig.pl # Check return value to see if we should exit if [[ $? != 0 ]] then exit 1 fi # Generate ssh host keys if they don't exist if [[ ! -f /etc/ssh/ssh_host_rsa_key ]] then dpkg-reconfigure openssh-server fi } # # Stop Function # fa_stop_func() { log_success_msg "Flash Accel Management Console Shutting Down" log_success_msg "" } case "$1" in start) fa_start_func ;; stop) fa_stop_func ;; restart) fa_stop_func sleep 5 fa_start_func ;; *) echo echo $"Usage: $0 {start|stop|restart}" echo ;; esac exit $status