ntpd nestartuje pres Ansible
Miroslav Lachman
000.fbsd at quip.cz
Mon Oct 16 23:40:28 CEST 2017
Dan Lukes wrote on 10/16/2017 23:08:10-a (1): Starting
>
> Spis by me zajimal vystup toho /etc/rc.d/ntpd restart
changed: [aaaa.xyz.tld] => {"changed": true, "cmd": "/etc/rc.d/ntpd
restart", "delta": "0:00:00.111317", "end": "2017-10-16
22:05:25.490411", "rc": 0, "start": "2017-10-16 22:05:25.379094",
"stderr": "", "stdout": "Stopping ntpd.\nWaiting for PIDS:
757.\nStarting ntpd.", "stdout_lines": ["Stopping ntpd.", "Waiting for
PIDS: 757.", "Starting ntpd."], "warnings": []}
> A jeste lepe, vystup pote, co to zavolas jako
> /bin/sh -x /etc/rc.d/ntpd restart
Pripojen na konci mailu, tak jak to vyleze z Ansible
>> Pritom treba Apache takhle restartuju bezne.
>
> Spatnej priklad. I kdyz jde v obou pripadech o "restart", jeho provedeni
> je diametralne odlisne. V pripade 'ntpd' je restart implementovan jako
> "zastavid daemona, spustit daemona", kdezto v pripade Apache to je
> "posles daemonovi definovany signal, on si znovu nacte konfigurace".
To si nemyslim, v rc.subr je restart popsany takto:
# restart Run `stop' then `start'.
Stejnym restartem jsem restartoval nginx, lighttpd...
Vystup /bin/sh -x /etc/rc.d/ntpd restart spustene skrz Ansible
changed: [aaaa.xyz.tld] => {"changed": true, "cmd": "/bin/sh -x
/etc/rc.d/ntpd restart", "delta": "0:00:01.166670", "end": "2017-10-16
23:35:10.628816", "rc": 0, "start": "2017-10-16 23:35:09.462146",
"stderr": "+ . /etc/rc.subr\n+ : 49560\n+ export RC_PID\n+ [ -z '' ]\n+
_rc_subr_loaded=YES\n+ SYSCTL=/sbin/sysctl\n+ SYSCTL_N='/sbin/sysctl
-n'\n+ SYSCTL_W=/sbin/sysctl\n+ ID=/usr/bin/id\n+ IDCMD='if [ -x
/usr/bin/id ]; then /usr/bin/id -un; fi'\n+ PS='/bin/ps -ww'\n+ /bin/ps
-ww -p 49560 -o jid=\n+ JID=0\n+ _rc_namevarlist='program chroot chdir
env flags fib nice user group groups prepend'\n+ _rc_subr_loaded=:\n+
name=ntpd\n+ rcvar=ntpd_enable\n+ command=/usr/sbin/ntpd\n+
pidfile=/var/run/ntpd.pid\n+ extra_commands=fetch\n+
fetch_cmd=ntpd_fetch_leapfile\n+ start_precmd=ntpd_precmd\n+
load_rc_config ntpd\n+ local _name _rcvar_val _var _defval _v _msg _new
_d\n+ _name=ntpd\n+ false\n+ [ -r /etc/defaults/rc.conf ]\n+ debug
'Sourcing /etc/defaults/rc.conf'\n+ . /etc/defaults/rc.conf\n+
rc_info=NO\n+ rc_startmsgs=YES\n+ rcshutdown_timeout=90\n+
early_late_divider=FILESYSTEMS\n+ always_force_depends=NO\n+
apm_enable=NO\n+ apmd_enable=NO\n+ apmd_flags=''\n+ ddb_enable=NO\n+
ddb_config=/etc/ddb.conf\n+ devd_enable=YES\n+ devd_flags=''\n+
kldxref_enable=NO\n+ kldxref_clobber=NO\n+ kldxref_module_path=''\n+
powerd_enable=NO\n+ powerd_flags=''\n+ tmpmfs=AUTO\n+ tmpsize=20m\n+
tmpmfs_flags=-S\n+ varmfs=AUTO\n+ varsize=32m\n+ varmfs_flags=-S\n+
populate_var=AUTO\n+ cleanvar_enable=YES\n+
local_startup=/usr/local/etc/rc.d\n+ script_name_sep=' '\n+
rc_conf_files='/etc/rc.conf /etc/rc.conf.local'\n+ zfs_enable=NO\n+
gptboot_enable=YES\n+ gbde_autoattach_all=NO\n+ gbde_devices=NO\n+
gbde_attach_attempts=3\n+ gbde_lockdir=/etc\n+ geli_devices=''\n+
geli_tries=''\n+ geli_default_flags=''\n+ geli_autodetach=YES\n+
root_rw_mount=YES\n+ fsck_y_enable=NO\n+ fsck_y_flags=''\n+
background_fsck=YES\n+ background_fsck_delay=60\n+ netfs_types='nfs:NFS
oldnfs:OLDNFS smbfs:SMB'\n+ extra_netfs_types=NO\n+ hostname=''\n+
hostid_enable=YES\n+ hostid_file=/etc/hostid\n+ nisdomainname=NO\n+
dhclient_program=/sbin/dhclient\n+ dhclient_flags=''\n+
background_dhclient=NO\n+ synchronous_dhclient=NO\n+
defaultroute_delay=30\n+ defaultroute_carrier_delay=5\n+
netif_ipexpand_max=2048\n+
wpa_supplicant_program=/usr/sbin/wpa_supplicant\n+
wpa_supplicant_flags=-s\n+
wpa_supplicant_conf_file=/etc/wpa_supplicant.conf\n+
firewall_enable=NO\n+ firewall_script=/etc/rc.firewall\n+
firewall_type=UNKNOWN\n+ firewall_quiet=NO\n+ firewall_logging=NO\n+
firewall_logif=NO\n+ firewall_flags=''\n+ firewall_coscripts=''\n+
firewall_client_net=192.0.2.0/24\n+ firewall_simple_iif=ed1\n+
firewall_simple_inet=192.0.2.16/28\n+ firewall_simple_oif=ed0\n+
firewall_simple_onet=192.0.2.0/28\n+ firewall_myservices=''\n+
firewall_allowservices=''\n+ firewall_trusted=''\n+
firewall_logdeny=NO\n+ firewall_nologports='135-139,445 1026,1027
1433,1434'\n+ firewall_nat_enable=NO\n+ firewall_nat_interface=''\n+
firewall_nat_flags=''\n+ dummynet_enable=NO\n+ ip_portrange_first=NO\n+
ip_portrange_last=NO\n+ ike_enable=NO\n+
ike_program=/usr/local/sbin/isakmpd\n+ ike_flags=''\n+
ipsec_enable=NO\n+ ipsec_file=/etc/ipsec.conf\n+
natd_program=/sbin/natd\n+ natd_enable=NO\n+ natd_interface=''\n+
natd_flags=''\n+ ipfilter_enable=NO\n+ ipfilter_program=/sbin/ipf\n+
ipfilter_rules=/etc/ipf.rules\n+ ipfilter_flags=''\n+ ipnat_enable=NO\n+
ipnat_program=/sbin/ipnat\n+ ipnat_rules=/etc/ipnat.rules\n+
ipnat_flags=''\n+ ipmon_enable=NO\n+ ipmon_program=/sbin/ipmon\n+
ipmon_flags=-Ds\n+ ipfs_enable=NO\n+ ipfs_program=/sbin/ipfs\n+
ipfs_flags=''\n+ pf_enable=NO\n+ pf_rules=/etc/pf.conf\n+
pf_program=/sbin/pfctl\n+ pf_flags=''\n+ pflog_enable=NO\n+
pflog_logfile=/var/log/pflog\n+ pflog_program=/sbin/pflogd\n+
pflog_flags=''\n+ ftpproxy_enable=NO\n+ ftpproxy_flags=''\n+
pfsync_enable=NO\n+ pfsync_syncdev=''\n+ pfsync_syncpeer=''\n+
pfsync_ifconfig=''\n+ tcp_extensions=YES\n+ log_in_vain=0\n+
tcp_keepalive=YES\n+ tcp_drop_synfin=NO\n+ icmp_drop_redirect=NO\n+
icmp_log_redirect=NO\n+ network_interfaces=auto\n+
cloned_interfaces=''\n+ sppp_interfaces=''\n+ fec_interfaces=''\n+
ppp_enable=NO\n+ ppp_program=/usr/sbin/ppp\n+ ppp_mode=auto\n+
ppp_nat=YES\n+ ppp_profile=papchap\n+ ppp_user=root\n+
hostapd_enable=NO\n+ syslogd_enable=YES\n+
syslogd_program=/usr/sbin/syslogd\n+ syslogd_flags=-s\n+
altlog_proglist=''\n+ inetd_enable=NO\n+
inetd_program=/usr/sbin/inetd\n+ inetd_flags='-wW -C 60'\n+
iscsid_enable=NO\n+ iscsictl_enable=NO\n+ iscsictl_flags=-Aa\n+
hastd_enable=NO\n+ hastd_program=/sbin/hastd\n+ hastd_flags=''\n+
ctld_enable=NO\n+ local_unbound_enable=NO\n+ kdc_enable=NO\n+
kdc_program=/usr/libexec/kdc\n+ kdc_flags=''\n+ kadmind_enable=NO\n+
kadmind_program=/usr/libexec/kadmind\n+ kpasswdd_enable=NO\n+
kpasswdd_program=/usr/libexec/kpasswdd\n+ kfd_enable=NO\n+
kfd_program=/usr/libexec/kfd\n+ kfd_flags=''\n+
ipropd_master_enable=NO\n+
ipropd_master_program=/usr/libexec/ipropd-master\n+
ipropd_master_flags=''\n+ ipropd_master_keytab=/etc/krb5.keytab\n+
ipropd_master_slaves=''\n+ ipropd_slave_enable=NO\n+
ipropd_slave_program=/usr/libexec/ipropd-slave\n+
ipropd_slave_flags=''\n+ ipropd_slave_keytab=/etc/krb5.keytab\n+
ipropd_slave_master=''\n+ gssd_enable=NO\n+
gssd_program=/usr/sbin/gssd\n+ gssd_flags=''\n+ rwhod_enable=NO\n+
rwhod_flags=''\n+ rarpd_enable=NO\n+ rarpd_flags=-a\n+
bootparamd_enable=NO\n+ bootparamd_flags=''\n+ pppoed_enable=NO\n+
pppoed_provider='*'\n+ pppoed_flags='-P /var/run/pppoed.pid'\n+
pppoed_interface=fxp0\n+ sshd_enable=NO\n+
sshd_program=/usr/sbin/sshd\n+ sshd_flags=''\n+ ftpd_enable=NO\n+
ftpd_program=/usr/libexec/ftpd\n+ ftpd_flags=''\n+ amd_enable=NO\n+
amd_program=/usr/sbin/amd\n+ amd_flags='-a /.amd_mnt -l syslog /host
/etc/amd.map /net /etc/amd.map'\n+ amd_map_program=NO\n+
autofs_enable=NO\n+ automount_flags=''\n+ automountd_flags=''\n+
autounmountd_flags=''\n+ nfs_client_enable=NO\n+ nfs_access_cache=60\n+
nfs_server_enable=NO\n+ oldnfs_server_enable=NO\n+ nfs_server_flags='-u
-t'\n+ nfs_server_managegids=NO\n+ mountd_enable=NO\n+ mountd_flags='-r
-S'\n+ weak_mountd_authentication=NO\n+ nfs_reserved_port_only=NO\n+
nfs_bufpackets=''\n+ rpc_lockd_enable=NO\n+ rpc_lockd_flags=''\n+
rpc_statd_enable=NO\n+ rpc_statd_flags=''\n+ rpcbind_enable=NO\n+
rpcbind_program=/usr/sbin/rpcbind\n+ rpcbind_flags=''\n+
rpc_ypupdated_enable=NO\n+ keyserv_enable=NO\n+ keyserv_flags=''\n+
nfsv4_server_enable=NO\n+ nfscbd_enable=NO\n+ nfscbd_flags=''\n+
nfsuserd_enable=NO\n+ nfsuserd_flags=''\n+ timed_enable=NO\n+
timed_flags=''\n+ ntpdate_enable=NO\n+
ntpdate_program=/usr/sbin/ntpdate\n+ ntpdate_flags=-b\n+
ntpdate_config=/etc/ntp.conf\n+ ntpdate_hosts=''\n+ ntpd_enable=NO\n+
ntpd_program=/usr/sbin/ntpd\n+ ntpd_config=/etc/ntp.conf\n+
ntpd_sync_on_start=NO\n+ ntpd_flags='-p /var/run/ntpd.pid -f
/var/db/ntpd.drift'\n+ ntp_src_leapfile=/etc/ntp/leap-seconds\n+
ntp_db_leapfile=/var/db/ntpd.leap-seconds.list\n+
ntp_leapfile_sources=https://www.ietf.org/timezones/data/leap-seconds.list\n+
ntp_leapfile_fetch_opts=-mq\n+ ntp_leapfile_expiry_days=30\n+
ntp_leapfile_fetch_verbose=NO\n+ nis_client_enable=NO\n+
nis_client_flags=''\n+ nis_ypset_enable=NO\n+ nis_ypset_flags=''\n+
nis_server_enable=NO\n+ nis_server_flags=''\n+ nis_ypxfrd_enable=NO\n+
nis_ypxfrd_flags=''\n+ nis_yppasswdd_enable=NO\n+
nis_yppasswdd_flags=''\n+ bsnmpd_enable=NO\n+ bsnmpd_flags=''\n+
defaultrouter=NO\n+ static_arp_pairs=''\n+ static_ndp_pairs=''\n+
static_routes=''\n+ natm_static_routes=''\n+ gateway_enable=NO\n+
routed_enable=NO\n+ routed_program=/sbin/routed\n+ routed_flags=-q\n+
mrouted_enable=NO\n+ mrouted_program=/usr/local/sbin/mrouted\n+
mrouted_flags=''\n+ ipxgateway_enable=NO\n+ ipxrouted_enable=NO\n+
ipxrouted_flags=''\n+ arpproxy_all=NO\n+ forward_sourceroute=NO\n+
accept_sourceroute=NO\n+ atm_enable=NO\n+ atm_pvcs=''\n+ atm_arps=''\n+
hcsecd_enable=NO\n+ hcsecd_config=/etc/bluetooth/hcsecd.conf\n+
sdpd_enable=NO\n+ sdpd_control=/var/run/sdp\n+ sdpd_groupname=nobody\n+
sdpd_username=nobody\n+ bthidd_enable=NO\n+
bthidd_config=/etc/bluetooth/bthidd.conf\n+
bthidd_hids=/var/db/bthidd.hids\n+ rfcomm_pppd_server_enable=NO\n+
rfcomm_pppd_server_profile='one two'\n+
rfcomm_pppd_server_one_channel=1\n+ rfcomm_pppd_server_two_channel=3\n+
ubthidhci_enable=NO\n+ netwait_enable=NO\n+ netwait_timeout=60\n+
netwait_if_timeout=30\n+ icmp_bmcastecho=NO\n+
ipv6_network_interfaces=auto\n+ ipv6_activate_all_interfaces=NO\n+
ipv6_defaultrouter=NO\n+ ipv6_static_routes=''\n+
ipv6_gateway_enable=NO\n+ ipv6_cpe_wanif=NO\n+ ipv6_privacy=NO\n+
route6d_enable=NO\n+ route6d_program=/usr/sbin/route6d\n+
route6d_flags=''\n+ ipv6_default_interface=NO\n+ rtsol_flags=''\n+
rtsold_enable=NO\n+ rtsold_flags=-a\n+ rtadvd_enable=NO\n+
rtadvd_interfaces=''\n+ mroute6d_enable=NO\n+
mroute6d_program=/usr/local/sbin/pim6dd\n+ mroute6d_flags=''\n+
stf_interface_ipv4addr=''\n+ stf_interface_ipv4plen=0\n+
stf_interface_ipv6_ifid=0:0:0:1\n+ stf_interface_ipv6_slaid=0000\n+
ipv6_faith_prefix=NO\n+ ipv6_ipv4mapping=NO\n+
ipv6_ipfilter_rules=/etc/ipf6.rules\n+ ip6addrctl_enable=YES\n+
ip6addrctl_verbose=NO\n+ ip6addrctl_policy=AUTO\n+ keyboard=''\n+
keymap=NO\n+ keyrate=NO\n+ keybell=NO\n+ keychange=NO\n+ cursor=NO\n+
scrnmap=NO\n+ font8x16=NO\n+ font8x14=NO\n+ font8x8=NO\n+
blanktime=300\n+ saver=NO\n+ moused_nondefault_enable=YES\n+
moused_enable=NO\n+ moused_type=auto\n+ moused_port=/dev/psm0\n+
moused_flags=''\n+ mousechar_start=NO\n+ allscreens_flags=''\n+
allscreens_kbdflags=''\n+ mta_start_script=/etc/rc.sendmail\n+
sendmail_enable=NO\n+ sendmail_pidfile=/var/run/sendmail.pid\n+
sendmail_procname=/usr/sbin/sendmail\n+ sendmail_flags='-L sm-mta -bd
-q30m'\n+ sendmail_cert_create=YES\n+ sendmail_submit_enable=YES\n+
sendmail_submit_flags='-L sm-mta -bd -q30m
-ODaemonPortOptions=Addr=localhost'\n+ sendmail_outbound_enable=YES\n+
sendmail_outbound_flags='-L sm-queue -q30m'\n+
sendmail_msp_queue_enable=YES\n+ sendmail_msp_queue_flags='-L
sm-msp-queue -Ac -q30m'\n+ sendmail_rebuild_aliases=NO\n+
auditd_enable=NO\n+ auditd_program=/usr/sbin/auditd\n+
auditd_flags=''\n+ auditdistd_enable=NO\n+
auditdistd_program=/usr/sbin/auditdistd\n+ auditdistd_flags=''\n+
cron_enable=YES\n+ cron_program=/usr/sbin/cron\n+ cron_dst=YES\n+
cron_flags=''\n+ lpd_enable=NO\n+ lpd_program=/usr/sbin/lpd\n+
lpd_flags=''\n+ nscd_enable=NO\n+ chkprintcap_enable=NO\n+
chkprintcap_flags=-d\n+ dumpdev=NO\n+ dumpdir=/var/crash\n+
savecore_flags='-m 10'\n+ crashinfo_enable=YES\n+
crashinfo_program=/usr/sbin/crashinfo\n+ quota_enable=NO\n+
check_quotas=YES\n+ quotaon_flags=-a\n+ quotaoff_flags=-a\n+
quotacheck_flags=-a\n+ accounting_enable=NO\n+ ibcs2_enable=NO\n+
ibcs2_loaders=coff\n+ firstboot_sentinel=/firstboot\n+
sysvipc_enable=NO\n+ linux_enable=NO\n+ svr4_enable=NO\n+
clear_tmp_enable=NO\n+ clear_tmp_X=YES\n+ ldconfig_insecure=NO\n+
ldconfig_paths='/usr/lib/compat /usr/local/lib
/usr/local/lib/compat/pkg'\n+ ldconfig32_paths='/usr/lib32
/usr/lib32/compat'\n+ ldconfig_paths_aout='/usr/lib/compat/aout
/usr/local/lib/aout'\n+
ldconfig_local_dirs=/usr/local/libdata/ldconfig\n+
ldconfig_local32_dirs=/usr/local/libdata/ldconfig32\n+
kern_securelevel_enable=NO\n+ kern_securelevel=-1\n+ update_motd=YES\n+
entropy_file=/entropy\n+ entropy_dir=/var/db/entropy\n+
entropy_save_sz=2048\n+ entropy_save_num=8\n+ harvest_interrupt=YES\n+
harvest_ethernet=YES\n+ harvest_p_to_p=YES\n+ harvest_swi=YES\n+
dmesg_enable=YES\n+ watchdogd_enable=NO\n+ watchdogd_flags=''\n+
devfs_rulesets='/etc/defaults/devfs.rules /etc/devfs.rules'\n+
devfs_system_ruleset=''\n+ devfs_set_rulesets=''\n+
devfs_load_rulesets=YES\n+ performance_cx_lowest=HIGH\n+
performance_cpu_freq=NONE\n+ economy_cx_lowest=HIGH\n+
economy_cpu_freq=NONE\n+ virecover_enable=YES\n+ ugidfw_enable=NO\n+
bsdextended_script=/etc/rc.bsdextended\n+ newsyslog_enable=YES\n+
newsyslog_flags=-CN\n+ mixer_enable=YES\n+ opensm_enable=NO\n+
rctl_enable=NO\n+ rctl_rules=/etc/rctl.conf\n+ jail_enable=NO\n+
jail_parallel_start=NO\n+ jail_list=''\n+ jail_reverse_stop=NO\n+ [ -z
'' ]\n+ source_rc_confs_defined=yes\n+ source_rc_confs\n+ local i
sourced_files\n+ sourced_files=:/etc/rc.conf:\n+ [ -r /etc/rc.conf ]\n+
. /etc/rc.conf\n+ hostname=aaaa.xyz.tld\n+ ifconfig_bge1='inet
10.20.30.4 netmask 255.255.255.128'\n+ ifconfig_bge1_alias0='inet
10.20.30.5 netmask 255.255.255.255'\n+ ifconfig_bge1_alias1='inet
10.20.30.6 netmask 255.255.255.255'\n+ ifconfig_bge1_alias2='inet
10.20.30.7 netmask 255.255.255.255'\n+ ifconfig_nfe0='inet 192.168.23.2
netmask 255.255.255.0'\n+ ifconfig_nfe0_alias0='inet 192.168.22.1
netmask 255.255.255.0'\n+ defaultrouter=10.20.30.1\n+ sshd_enable=YES\n+
ntpdate_enable=YES\n+ ntpdate_hosts=europe.pool.ntp.org\n+
ntpd_enable=YES\n+ ntpd_sync_on_start=YES\n+ ntpd_flags='-p
/var/run/ntpd.pid -f /var/db/ntpd.drift -d -d -d -d -d'\n+
font8x8=iso02-8x8\n+ font8x14=iso02-8x14\n+ font8x16=iso02-8x16\n+
keyrate=fast\n+ kern_securelevel=1\n+ kld_list='ipmi accf_http accf_data
if_tap'\n+ clear_tmp_enable=YES\n+ nfs_server_enable=NO\n+
nfs_client_enable=YES\n+ portmap_enable=NO\n+ inetd_enable=NO\n+
syslogd_enable=YES\n+ syslogd_flags=-ss\n+ icmp_drop_redirect=YES\n+
icmp_bmcastecho=NO\n+ gateway_enable=YES\n+ pf_enable=YES\n+
pf_rules=/etc/pf.conf\n+ pf_flags=''\n+ pflog_enable=NO\n+
bsnmpd_enable=YES\n+ sendmail_enable=NO\n+ sendmail_submit_enable=NO\n+
sendmail_outbound_enable=NO\n+ sendmail_msp_queue_enable=NO\n+
smartd_enable=YES\n+ bsdstats_enable=YES\n+ apache24_enable=YES\n+
apache24_http_accept_enable=YES\n+ mysql_enable=YES\n+
postfix_enable=YES\n+ proftpd_enable=YES\n+ rsyncd_enable=YES\n+
courier_authdaemond_enable=YES\n+ courier_imap_imapd_enable=YES\n+
courier_imap_imapd_ssl_enable=YES\n+ courier_imap_pop3d_enable=YES\n+
courier_imap_pop3d_ssl_enable=YES\n+ amavisd_enable=YES\n+
amavis_p0fanalyzer_enable=YES\n+ amavis_p0fanalyzer_p0f_filter='tcp dst
port 25'\n+ postsrsd_enable=YES\n+ dhcpd_enable=YES\n+ dhcpd_flags=-q\n+
dhcpd_ifaces=nfe0\n+ dhcpd_chroot_enable=YES\n+ cloned_interfaces=lo1\n+
ifconfig_lo1='inet 172.16.16.2 netmask 255.255.255.0'\n+
jail_enable=YES\n+ sourced_files=:/etc/rc.conf::/etc/rc.conf.local:\n+ [
-r /etc/rc.conf.local ]\n+ _rc_conf_loaded=true\n+ [ -n ntpd ]\n+
_d=/etc\n+ [ -f /etc/rc.conf.d/ntpd ]\n+ [ -d /etc/rc.conf.d/ntpd ]\n+
_d=/usr/local/etc\n+ [ -f /usr/local/etc/rc.conf.d/ntpd ]\n+ [ -d
/usr/local/etc/rc.conf.d/ntpd ]\n+ eval '_defval=$ntpd_enable_defval'\n+
_defval=''\n+ [ -n '' ]\n+ run_rc_command restart\n+ _return=0\n+
rc_arg=restart\n+ [ -z ntpd ]\n+ shift 1\n+ rc_extra_args=''\n+
_rc_prefix=''\n+ eval '_override_command=$ntpd_program'\n+
_override_command=/usr/sbin/ntpd\n+ command=/usr/sbin/ntpd\n+
_keywords='start stop restart rcvar enabled fetch'\n+ rc_pid=''\n+
_pidcmd=''\n+ _procname=/usr/sbin/ntpd\n+ [ -n /usr/sbin/ntpd ]\n+ [ -n
/var/run/ntpd.pid ]\n+ _pidcmd='rc_pid=$(check_pidfile /var/run/ntpd.pid
/usr/sbin/ntpd )'\n+ [ -n 'rc_pid=$(check_pidfile /var/run/ntpd.pid
/usr/sbin/ntpd )' ]\n+ _keywords='start stop restart rcvar enabled fetch
status poll'\n+ [ -z restart ]\n+ [ restart = enabled ]\n+ [ -n '' ]\n+
eval 'rc_flags=$ntpd_flags'\n+ rc_flags='-p /var/run/ntpd.pid -f
/var/db/ntpd.drift -d -d -d -d -d'\n+ eval '_chdir=$ntpd_chdir'
'_chroot=$ntpd_chroot' '_nice=$ntpd_nice' '_user=$ntpd_user'
'_group=$ntpd_group' '_groups=$ntpd_groups' '_fib=$ntpd_fib'
'_env=$ntpd_env' '_prepend=$ntpd_prepend'\n+ _chdir='' _chroot=''
_nice='' _user='' _group='' _groups='' _fib='' _env='' _prepend=''\n+ [
-n '' ]\n+ [ -z '' ]\n+ eval 'rc_pid=$(check_pidfile' /var/run/ntpd.pid
/usr/sbin/ntpd ')'\n+ check_pidfile /var/run/ntpd.pid /usr/sbin/ntpd\n+
_pidfile=/var/run/ntpd.pid\n+ _procname=/usr/sbin/ntpd\n+
_interpreter=''\n+ [ -z /var/run/ntpd.pid -o -z /usr/sbin/ntpd ]\n+ [ !
-f /var/run/ntpd.pid ]\n+ read _pid _junk\n+ [ -z 33709 ]\n+
_find_processes /usr/sbin/ntpd . '-p 33709'\n+ [ 3 -ne 3 ]\n+
_procname=/usr/sbin/ntpd\n+ _interpreter=.\n+ _psargs='-p 33709'\n+
_pref=''\n+ [ . != . ]\n+ _procnamebn=ntpd\n+ _fp_args='_arg0 _argv'\n+
_fp_match='case \"$_arg0\" in\n\t\t
$_procname|$_procnamebn|${_procnamebn}:|\"(${_procnamebn})\"|\"[${_procnamebn}]\")'\n+
_proccheck='\t\t/bin/ps -ww 2>/dev/null -o pid= -o jid= -o command= -p
33709 |\n\t\twhile read _npid _jid _arg0 _argv; do\n\t\t\tcase
\"$_arg0\" in\n\t\t
$_procname|$_procnamebn|${_procnamebn}:|\"(${_procnamebn})\"|\"[${_procnamebn}]\")\n\t\t\t\tif
[ \"$JID\" -eq \"$_jid\" ];\n\t\t\t\tthen echo -n
\"$_pref$_npid\";\n\t\t\t\t_pref=\"
\";\n\t\t\t\tfi\n\t\t\t\t;;\n\t\t\tesac\n\t\tdone'\n+ eval /bin/ps -ww
'2>/dev/null' -o pid= -o jid= -o command= -p 33709 '|' while read _npid
_jid _arg0 '_argv;' do case '\"$_arg0\"' in
'$_procname|$_procnamebn|${_procnamebn}:|\"(${_procnamebn})\"|\"[${_procnamebn}]\")'
if [ '\"$JID\"' -eq '\"$_jid\"' '];' then echo -n '\"$_pref$_npid\";'
'_pref=\"' '\";' fi ';;' esac done\n+ /bin/ps -ww -o pid= -o jid= -o
command= -p 33709\n+ read _npid _jid _arg0 _argv\n+ [ 0 -eq 0 ]\n+ echo
-n 33709\n+ _pref=' '\n+ read _npid _jid _arg0 _argv\n+ rc_pid=33709\n+
[ start != restart ]\n+ continue\n+ [ stop != restart ]\n+ continue\n+ [
restart != restart ]\n+ [ -n ntpd_enable -a restart != rcvar -a restart
!= stop ]\n+ checkyesno ntpd_enable\n+ eval '_value=$ntpd_enable'\n+
_value=YES\n+ debug 'checkyesno: ntpd_enable is set to YES.'\n+ return
0\n+ [ restart = start -a -z '' -a -n 33709 ]\n+ eval
'_cmd=$restart_cmd' '_precmd=$restart_precmd'
'_postcmd=$restart_postcmd'\n+ _cmd='' _precmd='' _postcmd=''\n+ [ -n ''
]\n+ false\n+ _rc_restart_done=true\n+ _run_rc_precmd\n+
check_required_before restart\n+ local _f\n+ return 0\n+ [ -n '' ]\n+
check_required_after restart\n+ local _f _args\n+ return 0\n+ return
0\n+ run_rc_command stop\n+ _return=0\n+ rc_arg=stop\n+ [ -z ntpd ]\n+
shift 1\n+ rc_extra_args=''\n+ _rc_prefix=''\n+ eval
'_override_command=$ntpd_program'\n+ _override_command=/usr/sbin/ntpd\n+
command=/usr/sbin/ntpd\n+ _keywords='start stop restart rcvar enabled
fetch'\n+ rc_pid=''\n+ _pidcmd=''\n+ _procname=/usr/sbin/ntpd\n+ [ -n
/usr/sbin/ntpd ]\n+ [ -n /var/run/ntpd.pid ]\n+
_pidcmd='rc_pid=$(check_pidfile /var/run/ntpd.pid /usr/sbin/ntpd )'\n+ [
-n 'rc_pid=$(check_pidfile /var/run/ntpd.pid /usr/sbin/ntpd )' ]\n+
_keywords='start stop restart rcvar enabled fetch status poll'\n+ [ -z
stop ]\n+ [ stop = enabled ]\n+ [ -n '' ]\n+ eval
'rc_flags=$ntpd_flags'\n+ rc_flags='-p /var/run/ntpd.pid -f
/var/db/ntpd.drift -d -d -d -d -d'\n+ eval '_chdir=$ntpd_chdir'
'_chroot=$ntpd_chroot' '_nice=$ntpd_nice' '_user=$ntpd_user'
'_group=$ntpd_group' '_groups=$ntpd_groups' '_fib=$ntpd_fib'
'_env=$ntpd_env' '_prepend=$ntpd_prepend'\n+ _chdir='' _chroot=''
_nice='' _user='' _group='' _groups='' _fib='' _env='' _prepend=''\n+ [
-n '' ]\n+ [ -z '' ]\n+ eval 'rc_pid=$(check_pidfile' /var/run/ntpd.pid
/usr/sbin/ntpd ')'\n+ check_pidfile /var/run/ntpd.pid /usr/sbin/ntpd\n+
_pidfile=/var/run/ntpd.pid\n+ _procname=/usr/sbin/ntpd\n+
_interpreter=''\n+ [ -z /var/run/ntpd.pid -o -z /usr/sbin/ntpd ]\n+ [ !
-f /var/run/ntpd.pid ]\n+ read _pid _junk\n+ [ -z 33709 ]\n+
_find_processes /usr/sbin/ntpd . '-p 33709'\n+ [ 3 -ne 3 ]\n+
_procname=/usr/sbin/ntpd\n+ _interpreter=.\n+ _psargs='-p 33709'\n+
_pref=''\n+ [ . != . ]\n+ _procnamebn=ntpd\n+ _fp_args='_arg0 _argv'\n+
_fp_match='case \"$_arg0\" in\n\t\t
$_procname|$_procnamebn|${_procnamebn}:|\"(${_procnamebn})\"|\"[${_procnamebn}]\")'\n+
_proccheck='\t\t/bin/ps -ww 2>/dev/null -o pid= -o jid= -o command= -p
33709 |\n\t\twhile read _npid _jid _arg0 _argv; do\n\t\t\tcase
\"$_arg0\" in\n\t\t
$_procname|$_procnamebn|${_procnamebn}:|\"(${_procnamebn})\"|\"[${_procnamebn}]\")\n\t\t\t\tif
[ \"$JID\" -eq \"$_jid\" ];\n\t\t\t\tthen echo -n
\"$_pref$_npid\";\n\t\t\t\t_pref=\"
\";\n\t\t\t\tfi\n\t\t\t\t;;\n\t\t\tesac\n\t\tdone'\n+ eval /bin/ps -ww
'2>/dev/null' -o pid= -o jid= -o command= -p 33709 '|' while read _npid
_jid _arg0 '_argv;' do case '\"$_arg0\"' in
'$_procname|$_procnamebn|${_procnamebn}:|\"(${_procnamebn})\"|\"[${_procnamebn}]\")'
if [ '\"$JID\"' -eq '\"$_jid\"' '];' then echo -n '\"$_pref$_npid\";'
'_pref=\"' '\";' fi ';;' esac done\n+ /bin/ps -ww -o pid= -o jid= -o
command= -p 33709\n+ read _npid _jid _arg0 _argv\n+ [ 0 -eq 0 ]\n+ echo
-n 33709\n+ _pref=' '\n+ read _npid _jid _arg0 _argv\n+ rc_pid=33709\n+
[ start != stop ]\n+ continue\n+ [ stop != stop ]\n+ [ -n ntpd_enable -a
stop != rcvar -a stop != stop ]\n+ [ -n ntpd_enable -a stop = stop -a -z
33709 ]\n+ [ stop = start -a -z '' -a -n 33709 ]\n+ eval
'_cmd=$stop_cmd' '_precmd=$stop_precmd' '_postcmd=$stop_postcmd'\n+
_cmd='' _precmd='' _postcmd=''\n+ [ -n '' ]\n+ [ -z 33709 ]\n+
_run_rc_precmd\n+ check_required_before stop\n+ local _f\n+ return 0\n+
[ -n '' ]\n+ check_required_after stop\n+ local _f _args\n+ return 0\n+
return 0\n+ echo 'Stopping ntpd.'\n+ _run_rc_killcmd TERM\n+ local
_cmd\n+ _cmd='kill -TERM 33709'\n+ [ -n '' ]\n+ echo 'kill -TERM
33709'\n+ _doit='kill -TERM 33709'\n+ _run_rc_doit 'kill -TERM 33709'\n+
debug 'run_rc_command: doit: kill -TERM 33709'\n+ eval 'kill -TERM
33709'\n+ kill -TERM 33709\n+ _return=0\n+ [ 0 -ne 0 ]\n+ return 0\n+
wait_for_pids 33709\n+ local _list _prefix _nlist _j\n+ _list=33709\n+ [
-z 33709 ]\n+ _prefix=''\n+ true\n+ _nlist=''\n+ kill -0 33709\n+
_nlist=33709\n+ [ -n '' ]\n+ [ -z 33709 ]\n+ _list=33709\n+ echo -n
'Waiting for PIDS: 33709'\n+ _prefix=', '\n+ pwait 33709\n+ true\n+
_nlist=''\n+ kill -0 33709\n+ _nlist=33709\n+ [ -n ', ' ]\n+ sleep 1\n+
[ -z 33709 ]\n+ _list=33709\n+ echo -n , 33709\n+ _prefix=', '\n+ pwait
33709\n+ true\n+ _nlist=''\n+ kill -0 33709\n+ [ -z '' ]\n+ break\n+ [
-n ', ' ]\n+ echo .\n+ _run_rc_postcmd\n+ [ -n '' ]\n+ return 0\n+
return 0\n+ run_rc_command start\n+ _return=0\n+ rc_arg=start\n+ [ -z
ntpd ]\n+ shift 1\n+ rc_extra_args=''\n+ _rc_prefix=''\n+ eval
'_override_command=$ntpd_program'\n+ _override_command=/usr/sbin/ntpd\n+
command=/usr/sbin/ntpd\n+ _keywords='start stop restart rcvar enabled
fetch'\n+ rc_pid=''\n+ _pidcmd=''\n+ _procname=/usr/sbin/ntpd\n+ [ -n
/usr/sbin/ntpd ]\n+ [ -n /var/run/ntpd.pid ]\n+
_pidcmd='rc_pid=$(check_pidfile /var/run/ntpd.pid /usr/sbin/ntpd )'\n+ [
-n 'rc_pid=$(check_pidfile /var/run/ntpd.pid /usr/sbin/ntpd )' ]\n+
_keywords='start stop restart rcvar enabled fetch status poll'\n+ [ -z
start ]\n+ [ start = enabled ]\n+ [ -n '' ]\n+ eval
'rc_flags=$ntpd_flags'\n+ rc_flags='-p /var/run/ntpd.pid -f
/var/db/ntpd.drift -d -d -d -d -d'\n+ eval '_chdir=$ntpd_chdir'
'_chroot=$ntpd_chroot' '_nice=$ntpd_nice' '_user=$ntpd_user'
'_group=$ntpd_group' '_groups=$ntpd_groups' '_fib=$ntpd_fib'
'_env=$ntpd_env' '_prepend=$ntpd_prepend'\n+ _chdir='' _chroot=''
_nice='' _user='' _group='' _groups='' _fib='' _env='' _prepend=''\n+ [
-n '' ]\n+ [ -z '' ]\n+ eval 'rc_pid=$(check_pidfile' /var/run/ntpd.pid
/usr/sbin/ntpd ')'\n+ check_pidfile /var/run/ntpd.pid /usr/sbin/ntpd\n+
_pidfile=/var/run/ntpd.pid\n+ _procname=/usr/sbin/ntpd\n+
_interpreter=''\n+ [ -z /var/run/ntpd.pid -o -z /usr/sbin/ntpd ]\n+ [ !
-f /var/run/ntpd.pid ]\n+ read _pid _junk\n+ [ -z 33709 ]\n+
_find_processes /usr/sbin/ntpd . '-p 33709'\n+ [ 3 -ne 3 ]\n+
_procname=/usr/sbin/ntpd\n+ _interpreter=.\n+ _psargs='-p 33709'\n+
_pref=''\n+ [ . != . ]\n+ _procnamebn=ntpd\n+ _fp_args='_arg0 _argv'\n+
_fp_match='case \"$_arg0\" in\n\t\t
$_procname|$_procnamebn|${_procnamebn}:|\"(${_procnamebn})\"|\"[${_procnamebn}]\")'\n+
_proccheck='\t\t/bin/ps -ww 2>/dev/null -o pid= -o jid= -o command= -p
33709 |\n\t\twhile read _npid _jid _arg0 _argv; do\n\t\t\tcase
\"$_arg0\" in\n\t\t
$_procname|$_procnamebn|${_procnamebn}:|\"(${_procnamebn})\"|\"[${_procnamebn}]\")\n\t\t\t\tif
[ \"$JID\" -eq \"$_jid\" ];\n\t\t\t\tthen echo -n
\"$_pref$_npid\";\n\t\t\t\t_pref=\"
\";\n\t\t\t\tfi\n\t\t\t\t;;\n\t\t\tesac\n\t\tdone'\n+ eval /bin/ps -ww
'2>/dev/null' -o pid= -o jid= -o command= -p 33709 '|' while read _npid
_jid _arg0 '_argv;' do case '\"$_arg0\"' in
'$_procname|$_procnamebn|${_procnamebn}:|\"(${_procnamebn})\"|\"[${_procnamebn}]\")'
if [ '\"$JID\"' -eq '\"$_jid\"' '];' then echo -n '\"$_pref$_npid\";'
'_pref=\"' '\";' fi ';;' esac done\n+ /bin/ps -ww -o pid= -o jid= -o
command= -p 33709\n+ read _npid _jid _arg0 _argv\n+ rc_pid=''\n+ [ start
!= start ]\n+ [ -n ntpd_enable -a start != rcvar -a start != stop ]\n+
checkyesno ntpd_enable\n+ eval '_value=$ntpd_enable'\n+ _value=YES\n+
debug 'checkyesno: ntpd_enable is set to YES.'\n+ return 0\n+ [ start =
start -a -z '' -a -n '' ]\n+ eval '_cmd=$start_cmd'
'_precmd=$start_precmd' '_postcmd=$start_postcmd'\n+ _cmd=''
_precmd=ntpd_precmd _postcmd=''\n+ [ -n '' ]\n+ [ ! -x /usr/sbin/ntpd
]\n+ _run_rc_precmd\n+ check_required_before start\n+ local _f\n+ return
0\n+ [ -n ntpd_precmd ]\n+ debug 'run_rc_command: start_precmd:
ntpd_precmd '\n+ eval 'ntpd_precmd '\n+ ntpd_precmd\n+ rc_flags='-c
/etc/ntp.conf -p /var/run/ntpd.pid -f /var/db/ntpd.drift -d -d -d -d
-d'\n+ checkyesno ntpd_sync_on_start\n+ eval
'_value=$ntpd_sync_on_start'\n+ _value=YES\n+ debug 'checkyesno:
ntpd_sync_on_start is set to YES.'\n+ return 0\n+ rc_flags='-g -c
/etc/ntp.conf -p /var/run/ntpd.pid -f /var/db/ntpd.drift -d -d -d -d
-d'\n+ ntpd_init_leapfile\n+ [ ! -f /var/db/ntpd.leap-seconds.list ]\n+
[ ! -f /var/db/ntpd.leap-seconds.list ]\n+ [ -z '' ]\n+ return 0\n+
_return=0\n+ [ 0 -ne 0 ]\n+ check_required_after start\n+ local _f
_args\n+ return 0\n+ return 0\n+ check_startmsgs\n+ [ -n '' ]\n+ return
0\n+ echo 'Starting ntpd.'\n+ [ -n '' ]\n+ _doit='/usr/sbin/ntpd -g -c
/etc/ntp.conf -p /var/run/ntpd.pid -f /var/db/ntpd.drift -d -d -d -d -d
'\n+ [ -n '' ]\n+ [ -n '' ]\n+ [ -n '' ]\n+ _run_rc_doit '/usr/sbin/ntpd
-g -c /etc/ntp.conf -p /var/run/ntpd.pid -f /var/db/ntpd.drift -d -d -d
-d -d '\n+ debug 'run_rc_command: doit: /usr/sbin/ntpd -g -c
/etc/ntp.conf -p /var/run/ntpd.pid -f /var/db/ntpd.drift -d -d -d -d -d
'\n+ eval '/usr/sbin/ntpd -g -c /etc/ntp.conf -p /var/run/ntpd.pid -f
/var/db/ntpd.drift -d -d -d -d -d '\n+ /usr/sbin/ntpd -g -c
/etc/ntp.conf -p /var/run/ntpd.pid -f /var/db/ntpd.drift -d -d -d -d
-d\n+ _return=0\n+ [ 0 -ne 0 ]\n+ return 0\n+ _run_rc_postcmd\n+ [ -n ''
]\n+ return 0\n+ return 0\n+ _return=0\n+ [ 0 -ne 0 ]\n+
_run_rc_postcmd\n+ [ -n '' ]\n+ return 0\n+ return 0", "stdout":
"Stopping ntpd.\nWaiting for PIDS: 33709, 33709.\nStarting ntpd.",
"stdout_lines": ["Stopping ntpd.", "Waiting for PIDS: 33709, 33709.",
"Starting ntpd."], "warnings": []}
Vypada to uplne normalne. Zavola se stop, pak se zavola start, vypise to
Starting ntpd. a tim to konci... jenze vysledkem je, ze netpd nebezi.
Mirek
More information about the Users-l
mailing list