From owner-freebsd-current@FreeBSD.ORG Fri Jun 3 20:43:59 2011 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E05C61065680 for ; Fri, 3 Jun 2011 20:43:59 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from mx0.hoeg.nl (mx0.hoeg.nl [IPv6:2a01:4f8:101:5343::aa]) by mx1.freebsd.org (Postfix) with ESMTP id 828E08FC0A for ; Fri, 3 Jun 2011 20:43:59 +0000 (UTC) Received: by mx0.hoeg.nl (Postfix, from userid 1000) id B23F32A28CF3; Fri, 3 Jun 2011 22:43:58 +0200 (CEST) Date: Fri, 3 Jun 2011 22:43:58 +0200 From: Ed Schouten To: current@FreeBSD.org Message-ID: <20110603204358.GC50646@hoeg.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9hzSyicXuByfNYJd" Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Subject: llimport(8): Import lastlog into utmpx X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jun 2011 20:44:00 -0000 --9hzSyicXuByfNYJd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi all, I think not long after I replaced utmp with utmpx, I got requests to add utilities to convert the old utmp databases to the new formats. I added wtmpcvt(1) for /var/log/wtmp*, but I didn't add any tools for the other databases. Even though it's a bit overdue (more than one year later?), I think it wouldn't be a bad idea to add a utility to import lastlog for people who are going to upgrade from 7.x/8.x to 9.0. I've written a utility called llimport(8), which imports entries from lastlog into utx.lastlogin for users which do not already have an entry in the latter. I've also added an rc-script, which executes llimport when /var/log/lastlog is present and renames the old database to /var/log/lastlog.old. Any objections if I commit the following patch to HEAD one of these days? I will remove it from HEAD not long after we release 9.0, since an upgrade from 8.x to 10.x should go through 9.x anyway. http://80386.nl/pub/llimport.txt It would be nice if someone could look at the rc script. I think it should be okay, but it's not a part of the tree I'm familiar with. --=20 Ed Schouten WWW: http://80386.nl/ --9hzSyicXuByfNYJd Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (FreeBSD) iQIcBAEBAgAGBQJN6UeOAAoJEG5e2P40kaK7z2oP/3RLsUpnnpY5P7bXVzRNnkwQ GZhW902MEBn0ea0G2iRFiVRysxu9oSf9UX/3rK2B+8ZR7GNviyShPMd5XqY8wDgW NlbKJztTj7yZxcXppIP6cz61iEXQp/fCK9X73wQd3JMloIM5uxEtLjub2HDcVg9p mVRBz+MqasR8QNLbQiXBo3eQEjhNuVggT4b27BFbby/DH+UAxjk2tcf5xbb2WXHB VArr8eWFzDS4pAbdj6htNEZdyIHkrN1/Htafd3QoRd69QWkMuOF+h49BteJmtii+ 1wEFZQZ9Lo4NDAiYKd1GcFC+k1J7IoYO58vqXkijxh/V7IG9uGKRW1+yk7bPo8QJ 0KxEXMyuUUVw3WNrpJLq2q5FtH46ezlX6/mhrDtDT+vsooBwidAIoDcphsOhdLQS uHpLLsYKtyPLpgu9sma9kcEbp9Oa2qXKLMveIsKn2xvqFZ8v1zJe0zfTtvtKwi1o d0yOSU9ved7ZHWPOoDdf0LAJdoRLWRw2L3mVw2aAzmAgvE7OLONGZTl4MggkLKBn Ru6qpkD2JL61xu8mz973T6t1lVOpM1/v2wIMSUWaUp5nEwPUP+a7cUMsgpA+g+p1 csWxHwWEW4qwfz+2oP9J+a8vxD+Zh6eTbTnw3qpOByvg7tcgyy3JmkN8XdChnt+g D2zGV/WX6EWXWT02M5UZ =KRL/ -----END PGP SIGNATURE----- --9hzSyicXuByfNYJd--