Was supposed to be a linux distribution, now just a collection of build scripts for packages on top of (ideally) any distribution.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#!/bin/sh
|
|
|
|
umask 022
|
|
|
|
set -e
|
|
|
|
|
|
|
|
if [ "$(id -u)" != "0" ]; then
|
|
|
|
echo "Please run this script as root" 1>&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! "$rocket" ]; then
|
|
|
|
echo 'Please set the $rocket variable' 1>&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Changing ownership of $rocket to root"
|
|
|
|
chown -R 0.0 "$rocket"
|
|
|
|
|
|
|
|
echo "Creating device nodes"
|
|
|
|
mkdir -p "$rocket/dev"
|
|
|
|
if cut -d' ' -f2 /proc/mounts | grep "$rocket/dev" > /dev/null; then
|
|
|
|
umount -R "$rocket/dev"
|
|
|
|
fi
|
|
|
|
mknod -m 600 "$rocket/dev/console" c 5 1 2> /dev/null || true
|
|
|
|
mknod -m 666 "$rocket/dev/null" c 1 3 2> /dev/null || true
|
|
|
|
|
|
|
|
echo "Creating directories"
|
|
|
|
install -dm755 "$rocket/root"
|
|
|
|
mkdir -p "$rocket/etc/ssl" "$rocket/bin" "$rocket/usr/pkg" "$rocket/usr/sat"
|
|
|
|
|
|
|
|
echo "Moving temporary things into place"
|
|
|
|
ln -sf /tools/bin/sh "$rocket/bin/sh"
|
|
|
|
ln -sf /tools/bin/bash "$rocket/bin/bash"
|
|
|
|
ln -sf /tools/lib/ssl/certs "$rocket/etc/ssl/certs"
|
|
|
|
|
|
|
|
echo "Creating users and groups"
|
|
|
|
echo 'root:x:0:0:root:/root:/bin/sh' > "$rocket/etc/passwd"
|
|
|
|
echo 'root:x:0:' > "$rocket/etc/group"
|