Changeset 2757 in /cluster/svnroot


Ignore:
Timestamp:
Oct 27, 2010 11:27:00 PM (10 years ago)
Author:
skylar
Message:

merging in bccd-passwd fix (#529)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bccd-ng/branches/skylar-devel/packages/etc/init.d/bccd-passwd

    r2751 r2757  
    1 #!/bin/sh
     1#!/bin/bash
    22
    33# $Id$
     
    3232### END INIT INFO
    3333
    34 if [ `cat /etc/bccd-stage` == "LIBERATED" ]; then
     34if test $(cat /etc/bccd-stage) = "LIBERATED"; then
    3535        echo "We're liberated already."
    3636        exit 0
     
    3939# From the original BCCD
    4040
    41 for x in `cat /proc/cmdline` ; do \
     41for x in $(cat /proc/cmdline) ; do \
    4242        if test "x$$x" = "xautomode" || test "x$$x" = "xquickboot" ; then \
    4343                echo "**skipping bccd password**" ; \
     
    5656# Set up the same password for all users based upon the bccd password
    5757#
    58 sed -e "s|PASSWD|`grep ^bccd /etc/passwd | cut -d\: -f2`|g" /etc/passwd > /etc/passwd.bak
    59 test -f /etc/passwd.bak && mv /etc/passwd.bak /etc/passwd
     58sed -i -e "s|PASSWD|`grep ^bccd /etc/passwd | cut -d\: -f2`|g" /etc/passwd
    6059#
    6160# sync the keys.
Note: See TracChangeset for help on using the changeset viewer.