1
0
mirror of https://github.com/home-assistant/operating-system.git synced 2026-02-25 04:07:48 +00:00
Files
operating-system/buildroot-external/scripts/rootfs_layer.sh
2018-05-13 16:21:37 +02:00

33 lines
826 B
Bash

#!/bin/bash
function fix_rootfs() {
# Cleanup DHCP service, we don't need this with NetworkManager
rm -rf ${TARGET_DIR}/etc/systemd/system/multi-user.target.wants/dhcpcd.service
rm -rf ${TARGET_DIR}/usr/lib/systemd/system/dhcpcd.service
# Cleanup etc
rm -rf ${TARGET_DIR}/etc/init.d
rm -rf ${TARGET_DIR}/etc/modules-load.d
rm -rf ${TARGET_DIR}/etc/network
rm -rf ${TARGET_DIR}/etc/X11
rm -rf ${TARGET_DIR}/etc/xdg
# Cleanup root
rm -rf ${TARGET_DIR}/media
rm -rf ${TARGET_DIR}/srv
rm -rf ${TARGET_DIR}/opt
# Other stuff
rm -f ${TARGET_DIR}/usr/lib/os-release
# Fix tempfs
sed -i "/srv/d" ${TARGET_DIR}/usr/lib/tmpfiles.d/home.conf
}
function install_hassio_cli() {
sed -i "s|\(root.*\)/bin/sh|\1/usr/sbin/hassio-cli|" ${TARGET_DIR}/etc/passwd
}