File: postinst

package info (click to toggle)
postilion 0.9.2-3
  • links: PTS
  • area: main
  • in suites: potato
  • size: 12,200 kB
  • ctags: 6,009
  • sloc: ansic: 66,879; tcl: 12,863; makefile: 1,054; sh: 242
file content (27 lines) | stat: -rw-r--r-- 568 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh
set -e

syshostname=`hostname --fqdn`

## figure out the system's mailname

if [ -f /etc/mailname ]; then
  mailname=`cat /etc/mailname`
else
  echo 'Please enter the "mail name" of your system.  This is the hostname'
  echo 'portion of the address to be shown on outgoing news and mail messages.'
  echo "The default is $syshostname, your system's host name."
  echo
  echo -n "Mail name [$syshostname]: "
  read mailname
  echo
  if [ "$mailname" ]; then
    echo $mailname >/etc/mailname
  else
    echo $syshostname >/etc/mailname
  fi
fi


#DEBHELPER#