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
|
#!/bin/bash
|
||||||
# localtime - localtime plugin for postplug
|
# 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>
|
# Copyright (c) 2004-2007 by Davide Madrisan <davide.madrisan@qilinux.it>
|
||||||
|
|
||||||
if [ $UID != 0 ]; then
|
if [ $UID != 0 ]; then
|
||||||
@ -8,7 +8,7 @@ if [ $UID != 0 ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -f /etc/localtime ] && exit 0
|
[ -e /etc/localtime ] && exit 0
|
||||||
|
|
||||||
me="localtime"
|
me="localtime"
|
||||||
|
|
||||||
@ -21,12 +21,16 @@ logmsg "$me" $"creating /etc/timezone and /etc/localtime files..."
|
|||||||
|
|
||||||
# FIXME
|
# FIXME
|
||||||
case "$LANG" in
|
case "$LANG" in
|
||||||
|
es_*)
|
||||||
|
echo "Europe/Madrid" > /etc/timezone
|
||||||
|
ln -sf $ZONEINFODIR/Europe/Madrid /etc/localtime
|
||||||
|
;;
|
||||||
it_*)
|
it_*)
|
||||||
echo "Europe/Rome" > /etc/timezone
|
echo "Europe/Rome" > /etc/timezone
|
||||||
cp -f $ZONEINFODIR/Europe/Rome /etc/localtime
|
ln -sf $ZONEINFODIR/Europe/Rome /etc/localtime
|
||||||
;;
|
;;
|
||||||
*) echo "GMT" > /etc/timezone
|
*) echo "GMT" > /etc/timezone
|
||||||
cp -f $ZONEINFODIR/GMT /etc/localtime
|
ln -sf $ZONEINFODIR/GMT /etc/localtime
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# console - virtual consoles plugin for postplug
|
# 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
|
# systemd: no need to manage inittab
|
||||||
[ -d /run/systemd ] && exit 0
|
[ -d /run/systemd ] && exit 0
|
||||||
|
Loading…
Reference in New Issue
Block a user