0508239181
Linux compatibility package based on the openSUSE Linux distribution. Please visit http://www.opensuse.org/ for more information about openSUSE Linux. This package supports running ELF binaries linked with glibc2 that don't require X11 shared libraries.
36 lines
870 B
Bash
36 lines
870 B
Bash
#!/bin/sh
|
|
#
|
|
# $NetBSD: linux-mkpwd.sh,v 1.1.1.1 2012/03/21 13:35:50 obache Exp $
|
|
#
|
|
|
|
######################################################################
|
|
#
|
|
# NAME
|
|
# @LINUX_BASE@-mkpwd -- create passwd/group files for COMPAT_LINUX
|
|
#
|
|
# SYNOPSYS
|
|
# @LINUX_BASE@-mkpwd
|
|
#
|
|
# DESCRIPTION
|
|
# @LINUX_BASE@-mkpwd creates passwd and group files and databases
|
|
# for a COMPAT_LINUX installation based on the files found in
|
|
# /etc, e.g. /etc/passwd, /etc/master.passwd, /etc/group, etc.
|
|
#
|
|
######################################################################
|
|
|
|
SRCDIR=/etc
|
|
DESTDIR=@EMULDIR@/etc
|
|
|
|
[ -d $DESTDIR ] || exit 1
|
|
|
|
umask 22
|
|
cd $DESTDIR
|
|
cp -f $SRCDIR/passwd .
|
|
sed s/^wheel:/root:/ <$SRCDIR/group >group
|
|
|
|
umask 77
|
|
awk -F: '{print($1":"$2":0:0:10000::::")}' <$SRCDIR/master.passwd >shadow
|
|
sed s/^wheel:/root:/ <$SRCDIR/group |
|
|
awk -F: '{print($1":*:root:root")}' >gshadow
|
|
|
|
exit 0
|