/[smeserver]/rpms/e-smith-base/sme10/e-smith-base-5.8.0.bz9631.SetHostnameByHostnamectl.patch
ViewVC logotype

Contents of /rpms/e-smith-base/sme10/e-smith-base-5.8.0.bz9631.SetHostnameByHostnamectl.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Mon Jul 4 07:39:33 2016 UTC (8 years, 4 months ago) by stephdl
Branch: MAIN
CVS Tags: e-smith-base-5_8_0-71_el7_sme, e-smith-base-5_8_0-67_el7_sme, e-smith-base-5_8_0-64_el7_sme, e-smith-base-5_8_0-69_el7_sme, e-smith-base-5_8_0-70_el7_sme, e-smith-base-5_8_0-60_el7_sme, e-smith-base-5_8_0-65_el7_sme, e-smith-base-5_8_0-26_el7_sme, e-smith-base-5_8_0-39_el7_sme, e-smith-base-5_8_0-83_el7_sme, e-smith-base-5_8_0-96_el7_sme, e-smith-base-5_8_0-95_el7_sme, e-smith-base-5_8_0-34_el7_sme, e-smith-base-5_8_0-80_el7_sme, e-smith-base-5_8_0-85_el7_sme, e-smith-base-5_8_0-50_el7_sme, e-smith-base-5_8_0-22_el7_sme, e-smith-base-5_8_0-81_el7_sme, e-smith-base-5_8_0-82_el7_sme, e-smith-base-5_8_0-88_el7_sme, e-smith-base-5_8_0-41_el7_sme, e-smith-base-5_8_0-38_el7_sme, e-smith-base-5_8_0-54_el7_sme, e-smith-base-5_8_0-99_el7_sme, e-smith-base-5_8_0-94_el7_sme, e-smith-base-5_8_0-98_el7_sme, e-smith-base-5_8_0-97_el7_sme, e-smith-base-5_8_0-92_el7_sme, e-smith-base-5_8_0-28_el7_sme, e-smith-base-5_8_0-29_el7_sme, e-smith-base-5_8_0-75_el7_sme, e-smith-base-5_8_0-78_el7_sme, e-smith-base-5_8_0-37_el7_sme, e-smith-base-5_8_0-90_el7_sme, e-smith-base-5_8_0-35_el7_sme, e-smith-base-5_8_0-93_el7_sme, e-smith-base-5_8_0-23_el7_sme, e-smith-base-5_8_0-19_el7_sme, e-smith-base-5_8_0-55_el7_sme, e-smith-base-5_8_0-61_el7_sme, e-smith-base-5_8_0-52_el7_sme, e-smith-base-5_8_0-46_el7_sme, e-smith-base-5_8_0-62_el7_sme, e-smith-base-5_8_0-74_el7_sme, e-smith-base-5_8_0-77_el7_sme, e-smith-base-5_8_0-36_el7_sme, e-smith-base-5_8_0-63_el7_sme, e-smith-base-5_8_0-73_el7_sme, e-smith-base-5_8_0-76_el7_sme, e-smith-base-5_8_0-79_el7_sme, e-smith-base-5_8_0-30_el7_sme, e-smith-base-5_8_0-91_el7_sme, e-smith-base-5_8_0-58_el7_sme, e-smith-base-5_8_0-32_el7_sme, e-smith-base-5_8_0-86_el7_sme, e-smith-base-5_8_0-47_el7_sme, e-smith-base-5_8_0-31_el7_sme, e-smith-base-5_8_0-59_el7_sme, e-smith-base-5_8_0-87_el7_sme, e-smith-base-5_8_0-53_el7_sme, e-smith-base-5_8_0-21_el7_sme, e-smith-base-5_8_0-44_el7_sme, e-smith-base-5_8_0-43_el7_sme, e-smith-base-5_8_0-40_el7_sme, e-smith-base-5_8_0-49_el7_sme, e-smith-base-5_8_0-48_el7_sme, e-smith-base-5_8_0-33_el7_sme, e-smith-base-5_8_0-66_el7_sme, e-smith-base-5_8_0-27_el7_sme, e-smith-base-5_8_0-68_el7_sme, e-smith-base-5_8_0-45_el7_sme, e-smith-base-5_8_0-20_el7_sme, e-smith-base-5_8_0-42_el7_sme, e-smith-base-5_8_0-72_el7_sme, e-smith-base-5_8_0-84_el7_sme, e-smith-base-5_8_0-89_el7_sme, e-smith-base-5_8_0-51_el7_sme, e-smith-base-5_8_0-24_el7_sme
* Mon Jul 4 2016 stephane de Labrusse <stephdl@de-labrusse.fr> 5.8.0-19.sme
- Set the hostname by hostnamectl [SME: 9631]
- Stefano Zamboni <zamboni@mind-at-work.it>

1 diff -Nur e-smith-base-5.8.0.bz9631.old/root/etc/e-smith/events/actions/set-hostname e-smith-base-5.8.0.bz9631.new/root/etc/e-smith/events/actions/set-hostname
2 --- e-smith-base-5.8.0.bz9631.old/root/etc/e-smith/events/actions/set-hostname 2005-11-21 05:28:05.000000000 +0100
3 +++ e-smith-base-5.8.0.bz9631.new/root/etc/e-smith/events/actions/set-hostname 2016-07-02 21:04:00.777373320 +0200
4 @@ -1,7 +1,7 @@
5 -#!/bin/sh
6 +#!/usr/bin/perl
7
8 #----------------------------------------------------------------------
9 -# copyright (C) 1999-2005 Mitel Networks Coporation
10 +# copyright (C) 2016 Koozali SME Server
11 #
12 # This program is free software; you can redistribute it and/or modify
13 # it under the terms of the GNU General Public License as published by
14 @@ -18,5 +18,14 @@
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 #
17 #----------------------------------------------------------------------
18 +use esmith::ConfigDB;
19
20 -exec /bin/hostname -F /etc/HOSTNAME
21 +my $db = esmith::ConfigDB->open_ro() or die 'cannot open the database';
22 +my $SystemName = $db->get_value('SystemName');
23 +my $DomainName = $db->get_value('DomainName');
24 +
25 +#set the command
26 +my $command = "exec /bin/hostnamectl set-hostname $SystemName.$DomainName";
27 +
28 +open EXEC, "$command |" or die "cannot set hostname: $!";
29 +close EXEC;

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed