sntpは-P(プロンプト)パラメータを置き換えます。

sntpは-P(プロンプト)パラメータを置き換えます。

SLES11sp4 Service Packにパッチが適用されるように設定されているコンピュータ上のいくつかのcronjobを維持していますが、Service Packはsntpをバージョン4.2.4p8から4.2.8p2にアップグレードし、そのバージョンのどこかで「-P」パラメータです。

~から高齢者ページ:

-P prompt
    sets the maximum clock change that will be made automatically to     
 maxerr. Acceptable values are from 1 to 3600 or no, and the default is  
 30. If the program is being run interactively in ordinary client mode, 
 and the system clock is to be changed, larger corrections will prompt 
 the user for confirmation. Specifying no will disable this and the 
 correction will be made regardless. 

私はcronジョブでこれをとても簡単に使います。

/usr/sbin/sntp -P no -r $ips[1] >& /dev/null
/usr/sbin/sntp -P no -r $ips[2] >& /dev/null

ここで、 $ips は一部の IP アドレスであると予想されます。

新しいバージョンでは、このような機能や自動モードや便利な機能は表示されません。もしそうなら、これは単なるデフォルトですか? 「-P」を削除できますか?それとも追加の作業がありますか?

ベストアンサー1

sntpは、バージョン4.2.4p8(2009年12月8日リリース)と4.2.6(2009年12月12日リリース)の間に書き直されたようです。これ変更ログ(ビルド)バージョン4.2.5p201は次のように言います。

投稿者:Harlan Stein、日付:2009/08/13

* sntp:古いものを削除し、新しいものを紹介します。

...sntpの-Pフラグが消える点。

新しいバージョンのマンページにはサンプル使用例があり、そのうちの1つは前のフラグの目的sntp -S ntpserver.somewhereに対応しています。-r複数の「ntpserver.somewhere」オプションを使用していないようですが、他のNTPサーバーに対して2回実行すると、どのような利点があるのか​​わかりません。

おすすめ記事