[Lunar-commits] r23127 - in lunar-tools/trunk: . ltime
Moritz Heiber
moe at lunar-linux.org
Sun Feb 4 02:20:37 CET 2007
Author: moe
Date: 2007-02-04 02:20:36 +0100 (Sun, 04 Feb 2007)
New Revision: 23127
Added:
lunar-tools/trunk/ltime/
lunar-tools/trunk/ltime/ltime
Modified:
lunar-tools/trunk/ChangeLog
lunar-tools/trunk/Makefile
lunar-tools/trunk/README
Log:
Add ltime. Manage your timezone with lunar :-)
Modified: lunar-tools/trunk/ChangeLog
===================================================================
--- lunar-tools/trunk/ChangeLog 2007-02-03 23:02:29 UTC (rev 23126)
+++ lunar-tools/trunk/ChangeLog 2007-02-04 01:20:36 UTC (rev 23127)
@@ -1,3 +1,9 @@
+2007-02-04 02:18 moe
+
+ * lunar-tools/trunk/ltime/ltime, lunar-tools/trunk/Makefile
+ lunar-tools/trunk/README, lunar-tools/trunk/ChangeLog:
+ Added ltime. Manage your timezones with lunar :-)
+
2005-05-26 21:12 striker
* lunar-tools/trunk/lnet/lnet: Yay for updates! o Added backtitle
Modified: lunar-tools/trunk/Makefile
===================================================================
--- lunar-tools/trunk/Makefile 2007-02-03 23:02:29 UTC (rev 23126)
+++ lunar-tools/trunk/Makefile 2007-02-04 01:20:36 UTC (rev 23127)
@@ -8,7 +8,7 @@
VERSION = 2006.1
PROGRAMS = lids/lids luser/luser lnet/lnet lservices/lservices \
- lmodules/lmodules clad/clad
+ lmodules/lmodules clad/clad ltime/ltime
DOCS = README COPYING ChangeLog
MANPAGES = lnet/lnet.8
PROFILEDFILES = clad/clad.rc
Modified: lunar-tools/trunk/README
===================================================================
--- lunar-tools/trunk/README 2007-02-03 23:02:29 UTC (rev 23126)
+++ lunar-tools/trunk/README 2007-02-04 01:20:36 UTC (rev 23127)
@@ -41,6 +41,13 @@
services. lservices also stores your choices for lunar which will
remember your choices.
+ltime -- lunar timezone management utility
+
+ ltime lets you change the timezone you selected during the
+ installation process. It makes use of the timezone date in
+ /usr/share/zoneinfo. You can also change the whether you
+ storing your time in GMT or localtime.
+
luser -- lunar user admin tool
luser is a ncurses user administration tool that adds easy methods
Added: lunar-tools/trunk/ltime/ltime
===================================================================
--- lunar-tools/trunk/ltime/ltime (rev 0)
+++ lunar-tools/trunk/ltime/ltime 2007-02-04 01:20:36 UTC (rev 23127)
@@ -0,0 +1,88 @@
+#!/bin/bash
+
+############################################################
+# #
+# ltime - Lunar Timezone Management Utility #
+# #
+############################################################
+# #
+# Parts of it are Copyright Auke Kok 2006 under GPLv2 #
+# Modified for Lunar Linux by Moritz Heiber #
+# #
+############################################################
+
+show_timezones()
+{
+ for ITEM in `ls --hide=[a-z]* $LOCALTIME/$1`; do
+ if [ -n "$1" ]; then
+ echo "$1/$ITEM"
+ else
+ echo "$ITEM"
+ fi
+ if [ -d $LOCALTIME/$1/$ITEM ]; then
+ echo "Directory"
+ else
+ echo "Timezone"
+ fi
+ done
+}
+
+
+timezone_menu()
+{
+ LOCALTIME=/usr/share/zoneinfo
+ TITLE="Time Zone Selection Menu"
+ HELP="Select timezone or directory"
+ ZONE=""
+
+ while
+ TIMEZONES=`show_timezones $ZONE` &&
+ ZONE=`$DIALOG --title "$TITLE" \
+ --menu \
+ "$HELP" \
+ 0 0 0 \
+ $TIMEZONES` &&
+ [ -d $LOCALTIME/$ZONE ]
+ do
+ true
+ done
+
+ if [ -f "$LOCALTIME/$ZONE" ]; then
+ ln -sf $LOCALTIME/$ZONE /etc/localtime
+
+ TITLE="GMT or Local"
+ HELP="Does the hardware clock store time in GMT or local?"
+
+ CLOCK=`$DIALOG --title "$TITLE" \
+ --menu "$HELP" \
+ 0 0 0 \
+ "GMT" "" \
+ "Local" ""` &&
+ case $CLOCK in
+ GMT) HWCLOCK="--utc" ;;
+ Local) HWCLOCK="--localtime" ;;
+ esac
+ (
+ echo "#!/bin/sh"
+ echo "/sbin/hwclock --hctosys $HWCLOCK"
+ ) > /etc/init.d/localtime
+ chmod 0755 /etc/init.d/localtime
+ ln -sf /etc/init.d/localtime /etc/rcS.d/S15localtime
+ break
+
+ fi
+}
+
+. /etc/lunar/config
+
+export IFS="$TAB_ENTER_IFS"
+
+DIALOG="dialog
+--backtitle
+Lunar Timezone Management Utility
+--stdout"
+
+root_check;
+environ_check;
+timezone_menu;
+clear;
Property changes on: lunar-tools/trunk/ltime/ltime
___________________________________________________________________
Name: svn:executable
+ *
More information about the Lunar-commits
mailing list