File: prepare-chroot

package info (click to toggle)
up-imapproxy 1.2.8~svn20171105-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 1,688 kB
  • sloc: ansic: 4,608; sh: 2,937; makefile: 116
file content (21 lines) | stat: -rw-r--r-- 466 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

set -e

chroot_directory=$(perl -ne '/^\s*chroot_directory\s*(\S+)$/ && print $1' \
    /etc/imapproxy.conf)

if [ -n "${chroot_directory}" ]
then
    mkdir -p "${chroot_directory}"/etc

    if [ -r /etc/localtime ]
    then
        if ! cmp -s /etc/localtime "${chroot_directory}"/etc/localtime
        then
            cp /etc/localtime "${chroot_directory}"/etc/localtime
        fi
    else
        rm -f "${chroot_directory}"/etc/localtime
    fi
fi