HowTo Shutdown NST Using A USB Flash Drive Install For Relocation

From NST Wiki
Revision as of 17:29, 25 October 2009 by Rwh (talk | contribs) (Preparing NST For Relocation Using: "/sbin/halt.local")
Jump to navigationJump to search

Preparing NST For Relocation Using: "/sbin/halt.local"

If you are using a "USB Flash Drive" hard disk installation, the following file: "/sbin/halt.local" found in the depiction below can be created so that the "USB Flash Drive" can be relocated to any other system that supports booting from a "USB Flash Drive".

  • Note: The file: "/sbin/halt.local" if found will be used by the script: "/etc/init.d/halt" during the shutdown process of an NST system.
#! /bin/bash

# Source function library...
. "/etc/init.d/functions";

echo -n "Preparing NST for relocation:";

#
# Prepare for move on each shutdown...
/usr/bin/nstboot --move;

if [ ${?} -eq 0 ]; then
  echo_success;         # signal success...
  echo;
  exit 0;
else
  echo_failure;         # signal failure...
  echo;
  exit 1;
fi