File: finalize

package info (click to toggle)
debootstick 2.8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 296 kB
  • sloc: sh: 1,364; makefile: 34
file content (17 lines) | stat: -rw-r--r-- 525 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# vim: filetype=sh

finalize_fs()
{
    fs_tree="$(cd "$1"; pwd)"
    cd "$fs_tree"

    # clean up
    rm -rf proc/* sys/* dev/* tmp/* \
            $(find run -type f) $(ls -1d var/cache/* | grep -v 'debconf$') var/lock

    # install debootstick init hook on getty command
    getty_command="$(realpath --relative-to . "$(readlink -f sbin/getty)")"
    mv "$getty_command" "${getty_command}.orig"
    ln -s /opt/debootstick/live/init/getty-hook.sh "$getty_command"
    echo "GETTY_COMMAND=$getty_command" >> dbstck.conf
}