Last change
on this file since 2813 was
2813,
checked in by leemasa, 10 years ago
|
Miscommand to telinit fixed
|
-
Property svn:executable set to
*
|
File size:
1.9 KB
|
Line | |
---|
1 | #!/bin/sh |
---|
2 | |
---|
3 | ### BEGIN INIT INFO |
---|
4 | # Provides: bccd-passwd |
---|
5 | # Required-Start: |
---|
6 | # Required-Stop: |
---|
7 | # Default-Start: S |
---|
8 | # Default-Stop: |
---|
9 | # Short-Description: Set bccd user password |
---|
10 | ### END INIT INFO |
---|
11 | |
---|
12 | echo "run BCCD-PASSWD" |
---|
13 | |
---|
14 | if [ `cat /etc/bccd-stage` == "LIBERATED" ]; then |
---|
15 | echo "We're liberated already." |
---|
16 | exit 0 |
---|
17 | fi |
---|
18 | |
---|
19 | if [ -f /testmode ]; then |
---|
20 | echo "Test mode, no password" |
---|
21 | echo "\n\n" | /bin/bccd-passwd-wrapper bccd |
---|
22 | update-rc.d ssh defaults |
---|
23 | sed -i 's/\/sbin\/getty 38400/\/sbin\/mingetty --autologin bccd/' /etc/inittab |
---|
24 | telinit q |
---|
25 | exit 0 |
---|
26 | fi |
---|
27 | |
---|
28 | # From the original BCCD |
---|
29 | |
---|
30 | for x in `cat /proc/cmdline` ; do \ |
---|
31 | if test "x$$x" = "xautomode" || test "x$$x" = "xquickboot" ; then \ |
---|
32 | echo "**skipping bccd password**" ; \ |
---|
33 | exit 1 ; \ |
---|
34 | fi ; \ |
---|
35 | done |
---|
36 | |
---|
37 | echo |
---|
38 | echo |
---|
39 | echo ${BOLD}Please set the password for the default user ${NORMAL} |
---|
40 | echo ${BOLD}-${NORMAL}-${BOLD}-${NORMAL}-${BOLD}-${NORMAL}-${BOLD}-${NORMAL}-${BOLD}-${NORMAL}-${BOLD}-${NORMAL}-${BOLD}-${NORMAL}-${BOLD}-${NORMAL}-${BOLD}-${NORMAL}-${BOLD}-${NORMAL}-${BOLD}-${NORMAL}-${BOLD}-${NORMAL}-${BOLD}-${NORMAL}-${BOLD}-${NORMAL}-${BOLD}-${NORMAL}-${BOLD}-${NORMAL}-${BOLD}-${NORMAL}-${BOLD}-${NORMAL}-${BOLD}-${NORMAL}-${BOLD}-${NORMAL}-${BOLD}-${NORMAL}-${BOLD}-${NORMAL}-${BOLD}-${NORMAL}-${BOLD}-${NORMAL}-${BOLD}-${NORMAL}-${BOLD}-${NORMAL}-${BOLD}-${NORMAL}-${BOLD}-${NORMAL}-${BOLD}-${NORMAL}-${BOLD}-${NORMAL}-${BOLD}-${NORMAL}-${BOLD}-${NORMAL}-${BOLD}-${NORMAL}-${BOLD}-${NORMAL}-${BOLD}-${NORMAL}-${BOLD}-${NORMAL}-${BOLD}-${NORMAL}-${BOLD}-${NORMAL} |
---|
41 | RC=1 |
---|
42 | /bin/bccd-passwd-wrapper bccd |
---|
43 | update-rc.d ssh defaults |
---|
44 | # |
---|
45 | # Set up the same password for all users based upon the bccd password |
---|
46 | # |
---|
47 | sed -e "s|PASSWD|`grep ^bccd /etc/passwd | cut -d\: -f2`|g" /etc/passwd > /etc/passwd.bak |
---|
48 | test -f /etc/passwd.bak && mv /etc/passwd.bak /etc/passwd |
---|
49 | # |
---|
50 | # sync the keys. |
---|
51 | # |
---|
52 | #test -d /home/lambccd && rsync -plarv /home/bccd/.ssh/ /home/lambccd/.ssh/ && chown -R lambccd:lambccd /home/lambccd/.ssh/ |
---|
Note: See
TracBrowser
for help on using the repository browser.