Files
odroid-stamper/fixups/S99-cleanup
Dongjin Kim 8b68df00bf fixup: remove internal LinuxFactory when cleanup
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: I13b1c738bfedfc888f866882988967827030f9d9
2025-08-22 16:52:00 +09:00

26 lines
499 B
Bash
Executable File

#!/bin/sh
truncate -s 0 /etc/machine-id
rm /sbin/initctl
dpkg-divert --rename --remove /sbin/initctl
apt autoremove -y
apt clean
rm -f /etc/flash-kernel/machine
rm -f /etc/apt/apt.conf.d/99debconf
rm -rf /tmp/*
rm -rf ~/.bash_history
rm -rf /root/default
chown -R root:root /boot
chown -R root:root /etc
chown -R root:root /root
if [ "x@@INTERNAL@@" = "xtrue" ]; then
sed -i "/internal/d" /etc/apt/sources.list.d/ppa-linuxfactory-or-kr.list
sed -i "/ppa.linuxfactory.or.kr/d" /etc/hosts
fi