|
Revision 1, 0.5 KB
(checked in by root, 6 years ago)
|
|
First post
|
| Line | |
|---|
| 1 | #!/bin/sh -e |
|---|
| 2 | |
|---|
| 3 | # $Id: login.ini,v 1.2 2005/08/13 10:02:16 thomasez Exp $ |
|---|
| 4 | |
|---|
| 5 | # |
|---|
| 6 | # The "How to set up login" - file. |
|---|
| 7 | # |
|---|
| 8 | . /etc/config |
|---|
| 9 | |
|---|
| 10 | # |
|---|
| 11 | # First, make the password file. |
|---|
| 12 | # |
|---|
| 13 | PW_F=/etc/passwd |
|---|
| 14 | |
|---|
| 15 | if [ "$PASSWORD" != "" ] |
|---|
| 16 | then |
|---|
| 17 | DES_PASSWORD=`cryptpw -a des $PASSWORD` |
|---|
| 18 | fi |
|---|
| 19 | |
|---|
| 20 | # Right now, all we do it handle the DES_PASSWORD correctly: |
|---|
| 21 | cp $PW_F $PW_F.org |
|---|
| 22 | if [ "$DES_PASSWORD" != "" ] |
|---|
| 23 | then |
|---|
| 24 | sed -e "s:ROOTPW:$DES_PASSWORD:" $PW_F.org > $PW_F |
|---|
| 25 | else |
|---|
| 26 | sed -e "s:ROOTPW:$PASSWORD:" $PW_F.org > $PW_F |
|---|
| 27 | fi |
|---|
| 28 | |
|---|
| 29 | rm $PW_F.org |
|---|
| 30 | |
|---|
| 31 | sed -i -e "s:^PASSWORD.*::" /etc/config |
|---|