comparison sbin/fjail @ 698:f8bd9471345a

fjail: Replace echo with flags by printf
author Franz Glasner <fzglas.hg@dom66.de>
date Tue, 01 Oct 2024 20:00:44 +0200
parents fbad4e8e3e42
children 4243b087fc2d
comparison
equal deleted inserted replaced
697:fbad4e8e3e42 698:f8bd9471345a
344 # 344 #
345 # See also /etc/rc.d/hostid and /etc/rc.d/hostid_save. 345 # See also /etc/rc.d/hostid and /etc/rc.d/hostid_save.
346 # 346 #
347 local _new_hostuuid _new_hostid 347 local _new_hostuuid _new_hostid
348 _new_hostuuid="$(uuidgen)" 348 _new_hostuuid="$(uuidgen)"
349 _new_hostid="$(echo -n ${_new_hostuuid} | /sbin/md5)" 349 _new_hostid="$(printf "%s" "${_new_hostuuid}" | /sbin/md5)"
350 _new_hostid="0x${_new_hostid%%????????????????????????}" 350 _new_hostid="0x${_new_hostid%%????????????????????????}"
351 351
352 echo "Proposed hostuuid/hostid:" 352 echo "Proposed hostuuid/hostid:"
353 echo " host.hostuuid = \"${_new_hostuuid}\";" 353 echo " host.hostuuid = \"${_new_hostuuid}\";"
354 echo " host.hostid = $((_new_hostid));" 354 echo " host.hostid = $((_new_hostid));"