localtime: create /etc/localtime as a symlink as required by systemd (and also good for sysv5)
This commit is contained in:
parent
d6e8096815
commit
f8beae5cbe
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
# localtime - localtime plugin for postplug
|
||||
# Copyright (c) 2004-2005 by Silvan Calarco <silvan.calarco@qilinux.it>
|
||||
# Copyright (c) 2004-2013 by Silvan Calarco <silvan.calarco@qilinux.it>
|
||||
# Copyright (c) 2004-2007 by Davide Madrisan <davide.madrisan@qilinux.it>
|
||||
|
||||
if [ $UID != 0 ]; then
|
||||
@ -8,7 +8,7 @@ if [ $UID != 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
[ -f /etc/localtime ] && exit 0
|
||||
[ -e /etc/localtime ] && exit 0
|
||||
|
||||
me="localtime"
|
||||
|
||||
@ -21,12 +21,16 @@ logmsg "$me" $"creating /etc/timezone and /etc/localtime files..."
|
||||
|
||||
# FIXME
|
||||
case "$LANG" in
|
||||
es_*)
|
||||
echo "Europe/Madrid" > /etc/timezone
|
||||
ln -sf $ZONEINFODIR/Europe/Madrid /etc/localtime
|
||||
;;
|
||||
it_*)
|
||||
echo "Europe/Rome" > /etc/timezone
|
||||
cp -f $ZONEINFODIR/Europe/Rome /etc/localtime
|
||||
ln -sf $ZONEINFODIR/Europe/Rome /etc/localtime
|
||||
;;
|
||||
*) echo "GMT" > /etc/timezone
|
||||
cp -f $ZONEINFODIR/GMT /etc/localtime
|
||||
ln -sf $ZONEINFODIR/GMT /etc/localtime
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
# console - virtual consoles plugin for postplug
|
||||
# Copyright (c) 2012 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
# Copyright (c) 2012-2013 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
|
||||
# systemd: no need to manage inittab
|
||||
[ -d /run/systemd ] && exit 0
|
||||
|
Loading…
Reference in New Issue
Block a user