Menu

[r2093]: / trunk / etc / rc.initial.reboot  Maximize  Restore  History

Download this file

27 lines (23 with data), 561 Bytes

#!/bin/sh
#
# rc.initial.reboot
# Copyright (c) 2007 Volker Theile (votdev@gmx.de)
#
# part of FreeNAS (http://www.freenas.org)
# Copyright (C) 2005-2007 Olivier Cochard <cochard@gmail.com>.
# All rights reserved.

. /etc/util.subr

productname=`get_product_name`

echo
echo "${productname} will reboot. This may take one minute."
while [ true ]
do
	echo -n "Do you want to proceed (y/n)? "
	_choice=$(head -n 1)
	case ${_choice} in
		[yY])	echo "${productname} is rebooting now.";
					/sbin/shutdown -r now >/dev/null;
					break;;
		[nN])	break;;
	esac
done
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.