#!/bin/sh -e # $Id: login.ini,v 1.2 2005/08/13 10:02:16 thomasez Exp $ # # The "How to set up login" - file. # . /etc/config # # First, make the password file. # PW_F=/etc/passwd if [ "$PASSWORD" != "" ] then DES_PASSWORD=`cryptpw -a des $PASSWORD` fi # Right now, all we do it handle the DES_PASSWORD correctly: cp $PW_F $PW_F.org if [ "$DES_PASSWORD" != "" ] then sed -e "s:ROOTPW:$DES_PASSWORD:" $PW_F.org > $PW_F else sed -e "s:ROOTPW:$PASSWORD:" $PW_F.org > $PW_F fi rm $PW_F.org sed -i -e "s:^PASSWORD.*::" /etc/config