Verified Commit 56a2be32 authored by A. Wilcox's avatar A. Wilcox 🦊
Browse files

adelie-build-{cd,txz}: Remove vestiges of boxes past

parent ae61fe98
#!/bin/sh
# addgroup - BusyBox compatibility shim
# bbshim
#
# Copyright © 2017 A. Wilcox. All rights reserved.
# Licensed under the terms of the NCSA Open Source license.
#
ARG=
CMDLINE=
while getopts :g:S ARG
do
case $ARG in
g) CMDLINE="$CMDLINE -g \"$OPTARG\"" ;;
S) CMDLINE="$CMDLINE -r" ;;
:) exit 1 ;;
\?) exit 1 ;;
esac
done
shift $(($OPTIND - 1))
if [ -z "$*" ]; then
echo "$0: group name is required" >&2
exit 1
fi
set "$@"
if [ -n "$2" ]; then
exec usermod -a -G $2 $1
fi
groupadd $CMDLINE $1
#!/bin/sh
# adduser - BusyBox compatibility shim
# bbshim
#
# Copyright © 2017 A. Wilcox. All rights reserved.
# Licensed under the terms of the NCSA Open Source license.
#
# The GECOS for the new user.
GECOS="Linux User,,,"
# Additional groups in which to add the new user.
MYGROUPS=
# Path to the home directory for the new user.
HOMEDIR=
# Don't call passwd(1) for the new user afterwards.
NOPASSWD=0
# The new user's shell.
MYSHELL=$SHELL
# An alternative skeleton directory for the new user's home directory.
SKEL=/etc/skel
# The new user is a system user.
SYSTEM=0
# Use this UID number for the new user.
MYUID=
ARG=
while getopts h:g:s:G:SDHu:k: ARG
do
case $ARG in
h) HOMEDIR=$OPTARG ;;
g) GECOS=$OPTARG ;;
s) MYSHELL=$OPTARG ;;
G) MYGROUPS=$OPTARG ;;
S) SYSTEM=1
MYSHELL="/bin/false";;
D) NOPASSWD=1 ;;
H) unset HOMEDIR ;;
u) MYUID=$OPTARG ;;
k) SKEL=$OPTARG ;;
:) exit 1 ;;
\?) exit 1 ;;
esac
done
shift $(($OPTIND - 1))
if [ -z "$*" ]; then
echo "$0: user name is required" >&2
exit 1
fi
set "$@"
CMDLINE="-s $MYSHELL"
if [ -n "$MYGROUPS" ]; then
CMDLINE="$CMDLINE -g $MYGROUPS"
fi
if [ -n "$HOMEDIR" ]; then
CMDLINE="$CMDLINE -m -d \"$HOMEDIR\" -k \"$SKEL\""
fi
if [ $SYSTEM -ne 0 ]; then
CMDLINE="$CMDLINE -r"
fi
if [ -n "$MYUID" ]; then
CMDLINE="$CMDLINE -u $MYUID"
fi
if [ -n "$2" ]; then
CMDLINE="$CMDLINE -g $2"
fi
useradd -c "$GECOS" $CMDLINE $1
#if [ $NOPASSWD -eq 0 ]; then
# passwd $1
#fi
......@@ -154,7 +154,6 @@ install_pkgs() {
mkdir -p squashroot-$ARCH/dev
mknod squashroot-$ARCH/dev/urandom c 1 9
mkdir -p squashroot-$ARCH/usr/sbin
cp addgroup adduser squashroot-$ARCH/usr/sbin/
apk --arch $ARCH \
-X "$URL/system/$EXTRA_MIRROR" \
-X "$URL/user/$EXTRA_MIRROR" \
......
......@@ -127,7 +127,6 @@ install_pkgs() {
mkdir -p rootfs-$ARCH/dev
mknod rootfs-$ARCH/dev/urandom c 1 9
mkdir -p rootfs-$ARCH/usr/sbin
cp addgroup adduser rootfs-$ARCH/usr/sbin/
apk --arch $ARCH \
-X "$URL/system/$EXTRA_MIRROR" \
-X "$URL/user/$EXTRA_MIRROR" \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment