From 9ce868a349fd26ebfd340efd44a8139493d092b7 Mon Sep 17 00:00:00 2001 From: rpe <> Date: Wed, 27 Apr 2016 09:17:53 +0000 Subject: [PATCH] Use 'sort -V' which is actually meant to sort version numbers. Noted by zhuk@ OK deraadt@ --- src/etc/rc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/etc/rc b/src/etc/rc index 76ad263d..1d7f2a71 100644 --- a/src/etc/rc +++ b/src/etc/rc @@ -1,4 +1,4 @@ -# $OpenBSD: rc,v 1.475 2016/04/26 14:56:14 deraadt Exp $ +# $OpenBSD: rc,v 1.476 2016/04/27 09:17:53 rpe Exp $ # System startup script run by init on autoboot or after single-user. # Output and error are redirected to console by init, and the console is the @@ -163,7 +163,7 @@ rebuildlibs() { # Only choose newest for _liba in /usr/lib/libc.so.*.a; do - _liba=$(ls ${_liba%%.[0-9]*}*.a | sort -n | tail -1) + _liba=$(ls ${_liba%%.[0-9]*}*.a | sort -V | tail -1) for _l in $_libas; do [[ $_l == $_liba ]] && continue 2 done