Add stage3
- Install libnss-mdns package - Sudo without password - Add and enable vision service
This commit is contained in:
parent
7870976ae7
commit
d8787ee10e
|
@ -96,7 +96,7 @@ export -f on_chroot
|
|||
update_issue() {
|
||||
local GIT_HASH
|
||||
GIT_HASH=$(git rev-parse HEAD)
|
||||
echo -e "Raspberry Pi reference ${IMG_DATE}\nGenerated using ${PI_GEN}, ${PI_GEN_REPO}, ${GIT_HASH}, ${1}" > "${ROOTFS_DIR}/etc/rpi-issue"
|
||||
echo -e "${IMG_NAME} built on ${IMG_DATE}\nGenerated using ${PI_GEN}, ${PI_GEN_REPO}, ${GIT_HASH}, ${1}" > "${ROOTFS_DIR}/etc/rpi-issue"
|
||||
}
|
||||
export -f update_issue
|
||||
|
||||
|
|
1
stage3/00-install-packages/00-packages
Normal file
1
stage3/00-install-packages/00-packages
Normal file
|
@ -0,0 +1 @@
|
|||
libnss-mdns
|
4
stage3/01-sudo-without-passwd/00-run.sh
Normal file
4
stage3/01-sudo-without-passwd/00-run.sh
Normal file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
# Enable password-less sudo for everyone
|
||||
echo "%sudo ALL=(ALL) NOPASSWD:ALL" >> "${ROOTFS_DIR}/etc/sudoers"
|
12
stage3/02-add-vision-service/00-run.sh
Normal file
12
stage3/02-add-vision-service/00-run.sh
Normal file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
# Install the service so the system can run it
|
||||
install -m 755 files/vision.service "${ROOTFS_DIR}/etc/systemd/system"
|
||||
|
||||
on_chroot << EOF
|
||||
# Reload the system services
|
||||
sudo systemctl daemon-reload
|
||||
|
||||
# Enable our vision service on startup
|
||||
sudo systemctl enable vision
|
||||
EOF
|
11
stage3/02-add-vision-service/files/vision.service
Normal file
11
stage3/02-add-vision-service/files/vision.service
Normal file
|
@ -0,0 +1,11 @@
|
|||
[Unit]
|
||||
Description=FRC Vision Service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Restart=always
|
||||
ExecStart=/home/vision/visionProgram
|
||||
WorkingDirectory=/home/vision
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
5
stage3/prerun.sh
Normal file
5
stage3/prerun.sh
Normal file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
if [ ! -d "${ROOTFS_DIR}" ]; then
|
||||
copy_previous
|
||||
fi
|
Loading…
Reference in New Issue
Block a user