summaryrefslogtreecommitdiff
path: root/patchroot.sh
blob: 76eb26a1e2cfdd22dd30efdea1678e20b3186118 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
hostname=adam
echo $hostname > /etc/hostname
sed -i -e 's/\blocalhost\b/& '"$hostname"'/' /etc/hosts

. /etc/os-release

# TODO: Write this in fsmgr
cat <<END > /etc/apt/sources.list
deb  http://httpredir.debian.org/debian  ${VERSION_CODENAME}            main  #contrib  non-free
deb  http://security.debian.org          ${VERSION_CODENAME}/updates    main  #contrib  non-free
#deb http://httpredir.debian.org/debian  ${VERSION_CODENAME}-backports  main  #contrib  non-free
END

set -- /var/lib/apt/lists/*_Packages
if [ -f "$1" ]
then
    # apt database validity demonstration
    apt-get update
    apt-cache dumpavail | dpkg --update-avail -
    apt-get -yd install iso-codes # baresip
    apt-mark install baresip
fi