mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-01-18 18:56:31 +00:00
345dc4161d
Signed-off-by: Alexey Neyman <stilor@att.net>
17 lines
255 B
Bash
Executable File
17 lines
255 B
Bash
Executable File
#!/bin/bash
|
|
|
|
usr=$1
|
|
uid=$2
|
|
grp=$3
|
|
gid=$4
|
|
shift 4
|
|
|
|
groupadd -g ${gid} ${grp}
|
|
useradd -d /home/${usr} -m -g ${gid} -u ${uid} ${usr}
|
|
ln -sf /src /home/${usr}/src
|
|
if [ -z "$*" ]; then
|
|
exec su -l ${usr}
|
|
else
|
|
exec su -l -c "/bin/bash -c '$*'" ${usr}
|
|
fi
|