summaryrefslogtreecommitdiff
path: root/bsdinstall/scripts/time
diff options
context:
space:
mode:
authorAlfonso Siciliano <alfsiciliano@gmail.com>2021-12-13 07:54:07 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2021-12-13 07:54:07 +0000
commite41955dd2d8635cfbab61acb8ad338e7d9f3e7da (patch)
treec4258f9c9a07ea971d4a871a2b5c3454df35d00c /bsdinstall/scripts/time
parent1b308d0631e5d0d21b631a688cdef1afe378e086 (diff)
Diffstat (limited to 'bsdinstall/scripts/time')
-rwxr-xr-xbsdinstall/scripts/time67
1 files changed, 0 insertions, 67 deletions
diff --git a/bsdinstall/scripts/time b/bsdinstall/scripts/time
deleted file mode 100755
index 0e6b32adc6b1..000000000000
--- a/bsdinstall/scripts/time
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/bin/sh
-#-
-# Copyright (c) 2011 Nathan Whitehorn
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
-#
-# $FreeBSD$
-
-# Select timezone
-chroot $BSDINSTALL_CHROOT tzsetup
-
-# Switch to target timezone
-saved_TZ="$TZ"
-TZ="${BSDINSTALL_CHROOT}/etc/localtime"
-export TZ
-
-# Set date
-exec 3>&1
-DATE=$(../../bsddialog --backtitle 'FreeBSD Installer' \
- --title 'Time & Date' \
- --ok-label 'Set Date' \
- --cancel-label 'Skip' \
- --defaultno \
- --date-format '%Y%m%d%H%M.%S' \
- --datebox '' 0 40 \
-2>&1 1>&3) && date $DATE
-exec 3>&-
-
-# Set time
-exec 3>&1
-TIME=$(../../bsddialog --backtitle 'FreeBSD Installer' \
- --title 'Time & Date' \
- --ok-label 'Set Time' \
- --cancel-label 'Skip' \
- --defaultno \
- --time-format '%H%M.%S' \
- --timebox '' 0 40 \
-2>&1 1>&3) && date $TIME
-exec 3>&-
-
-# Switch back
-if [ -n "$saved_TZ" ]; then
- TZ="$saved_TZ"
-else
- unset TZ
-fi
-unset saved_TZ