OSDN Git Service

整理した
[serene/serenelinux-system-pkg.git] / base-files.old / etc / update-motd.d / 00-header
1 #!/bin/sh
2 #
3 #    00-header - create the header of the MOTD
4 #    Copyright (C) 2009-2010 Canonical Ltd.
5 #
6 #    Authors: Dustin Kirkland <kirkland@canonical.com>
7 #
8 #    This program is free software; you can redistribute it and/or modify
9 #    it under the terms of the GNU General Public License as published by
10 #    the Free Software Foundation; either version 2 of the License, or
11 #    (at your option) any later version.
12 #
13 #    This program is distributed in the hope that it will be useful,
14 #    but WITHOUT ANY WARRANTY; without even the implied warranty of
15 #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 #    GNU General Public License for more details.
17 #
18 #    You should have received a copy of the GNU General Public License along
19 #    with this program; if not, write to the Free Software Foundation, Inc.,
20 #    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21
22 [ -r /etc/lsb-release ] && . /etc/lsb-release
23
24 if [ -z "$DISTRIB_DESCRIPTION" ] && [ -x /usr/bin/lsb_release ]; then
25         # Fall back to using the very slow lsb_release utility
26         DISTRIB_DESCRIPTION=$(lsb_release -s -d)
27 fi
28
29 printf "Welcome to %s (%s %s %s)\n" "$DISTRIB_DESCRIPTION" "$(uname -o)" "$(uname -r)" "$(uname -m)"