diff options
author | ngie <ngie@FreeBSD.org> | 2015-04-16 03:39:33 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2015-04-16 03:39:33 +0000 |
commit | 2d138d0a35f5c231b2bca2ab3604338672d83806 (patch) | |
tree | 0ff0a922dbdff685022963b11417c52896d16e64 /etc | |
parent | 4f3aa5e79f3935aa49bd7a4733d82942c7be9269 (diff) | |
parent | 833a9d1e0eccc0091c373939241568ea646c3a33 (diff) | |
download | FreeBSD-src-2d138d0a35f5c231b2bca2ab3604338672d83806.zip FreeBSD-src-2d138d0a35f5c231b2bca2ab3604338672d83806.tar.gz |
MFhead @ r281584
Diffstat (limited to 'etc')
-rw-r--r-- | etc/login.conf | 2 | ||||
-rwxr-xr-x | etc/rc.d/hostid_save | 15 |
2 files changed, 12 insertions, 5 deletions
diff --git a/etc/login.conf b/etc/login.conf index 966aa42..ae6b8a0 100644 --- a/etc/login.conf +++ b/etc/login.conf @@ -26,7 +26,7 @@ default:\ :passwd_format=sha512:\ :copyright=/etc/COPYRIGHT:\ :welcome=/etc/motd:\ - :setenv=MAIL=/var/mail/$,BLOCKSIZE=K:LC_COLLATE=C:\ + :setenv=MAIL=/var/mail/$,BLOCKSIZE=K,LC_COLLATE=C:\ :path=/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin ~/bin:\ :nologin=/var/run/nologin:\ :cputime=unlimited:\ diff --git a/etc/rc.d/hostid_save b/etc/rc.d/hostid_save index fca0521..9741aec 100755 --- a/etc/rc.d/hostid_save +++ b/etc/rc.d/hostid_save @@ -16,12 +16,19 @@ rcvar="hostid_enable" hostid_save() { - if [ ! -r ${hostid_file} ]; then - $SYSCTL_N kern.hostuuid > ${hostid_file} - if [ $? -ne 0 ]; then - warn "could not store hostuuid in ${hostid_file}." + current_hostid=`$SYSCTL_N kern.hostuuid` + + if [ -r ${hostid_file} ]; then + read saved_hostid < ${hostid_file} + if [ ${saved_hostid} = ${current_hostid} ]; then + exit 0 fi fi + + echo ${current_hostid} > ${hostid_file} + if [ $? -ne 0 ]; then + warn "could not store hostuuid in ${hostid_file}." + fi } load_rc_config $name |