Update gitea and remove rust (fake)
This commit is contained in:
parent
5cdb3e5c40
commit
e06e93736a
7 changed files with 30 additions and 81 deletions
|
@ -1,24 +1,27 @@
|
|||
#!/bin/sh
|
||||
#! /bin/sh
|
||||
|
||||
ROOTFS=`mktemp -d rootfs.XXX -t`
|
||||
TMPDIR=/tmp
|
||||
TARBALL=alpine-minirootfs-3.9.0-x86_64.tar.gz
|
||||
URL=http://dl-cdn.alpinelinux.org/alpine/v3.9/releases/x86_64/$TARBALL
|
||||
TARBALL=alpine-minirootfs-3.10.1-x86_64.tar.gz
|
||||
URL=http://dl-cdn.alpinelinux.org/alpine/v3.10/releases/x86_64/$TARBALL
|
||||
|
||||
# 6. undo
|
||||
sudo systemctl stop simple-test
|
||||
sudo portablectl detach $TMPDIR/simple.raw
|
||||
|
||||
[ "$URL" ] && wget -c $URL
|
||||
|
||||
mkdir $ROOTFS
|
||||
|
||||
# 1. create rootfs
|
||||
tar xf $TARBALL -C $ROOTFS/ \
|
||||
./etc/os-release ./usr ./lib ./bin ./sbin
|
||||
|
||||
# 2. create mount points
|
||||
mkdir -p $ROOTFS/etc/systemd/system $ROOTFS/var/{lib,run,tmp} $ROOTFS/{dev,proc,sys,tmp,run,root}
|
||||
chmod 755 $ROOTFS
|
||||
mkdir -p $ROOTFS/etc/systemd/system $ROOTFS/{proc,sys,dev,run,tmp,var/tmp}
|
||||
touch $ROOTFS/etc/machine-id $ROOTFS/etc/resolv.conf
|
||||
|
||||
# 3. simple service unit
|
||||
cat <<EOF > $ROOTFS/etc/systemd/system/simple.service
|
||||
cat <<EOF > $ROOTFS/etc/systemd/system/simple-test.service
|
||||
[Unit]
|
||||
Description=Simple portable test service
|
||||
|
||||
|
@ -33,7 +36,3 @@ mksquashfs $ROOTFS $TMPDIR/simple.raw -all-root -noappend
|
|||
# 5. attach and start the service
|
||||
sudo portablectl attach $TMPDIR/simple.raw
|
||||
sudo systemctl start simple-test
|
||||
|
||||
# 6. undo
|
||||
#sudo systemctl stop simple-test
|
||||
#sudo portablectl detach $TMPDIR/simple.raw
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue