mid-kid
10 years ago
4 changed files with 76 additions and 4 deletions
@ -0,0 +1,25 @@ |
|||||
|
#!/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" |
||||
|
mknod -m 600 "$rocket/dev/console" c 5 1 |
||||
|
mknod -m 666 "$rocket/dev/null" c 1 3 |
||||
|
|
||||
|
echo "Configuring astronaut" |
||||
|
mkdir -p "$rocket/etc" |
||||
|
echo '# This is a config for use with busybox |
||||
|
cmd_download="wget -O {dst} {src}"' > "$rocket/etc/astronaut.conf" |
Loading…
Reference in new issue