10 install_from_default() {
12 cp -p /usr/share/base-files/$1 $2
31 update_to_current_default() {
33 md5=`md5sum $2 | cut -f 1 -d " "`
34 if grep -q "$md5" /usr/share/base-files/$1.md5sums; then
35 if ! cmp -s /usr/share/base-files/$1 $2; then
36 cp -p /usr/share/base-files/$1 $2
37 echo Updating $2 to current default.
43 if [ ! -e /etc/dpkg/origins/default ]; then
44 if [ -e /etc/dpkg/origins/neon ]; then
45 ln -sf neon /etc/dpkg/origins/default
49 if [ "$1" = "configure" ] && [ "$2" = "" ]; then
50 install_from_default dot.profile /root/.profile
51 install_from_default dot.bashrc /root/.bashrc
52 install_from_default profile /etc/profile
53 install_from_default networks /etc/networks
54 install_directory mnt 755 root
55 install_directory srv 755 root
56 install_directory opt 755 root
57 install_directory etc/opt 755 root
58 install_directory var/opt 755 root
59 install_directory media 755 root
60 install_directory var/mail 2775 mail
61 if [ ! -L /var/spool/mail ]; then
62 ln -s ../mail /var/spool/mail
64 install_directory run/lock 1777 root
65 migrate_directory /var/run /run
66 migrate_directory /var/lock /run/lock
68 install_local_dir /usr/local
69 install_local_dir /usr/local/share
70 install_local_dir /usr/local/share/man
71 install_local_dir /usr/local/bin
72 install_local_dir /usr/local/games
73 install_local_dir /usr/local/lib
74 install_local_dir /usr/local/include
75 install_local_dir /usr/local/sbin
76 install_local_dir /usr/local/src
77 install_local_dir /usr/local/etc
78 ln -sf share/man /usr/local/man
80 if [ ! -f /var/log/wtmp ]; then
83 if [ ! -f /var/log/btmp ]; then
86 if [ ! -f /var/log/lastlog ]; then
87 echo -n>/var/log/lastlog
89 chown root:utmp /var/log/wtmp /var/log/btmp /var/log/lastlog
90 chmod 664 /var/log/wtmp /var/log/lastlog
91 chmod 660 /var/log/btmp
92 if [ ! -f /var/run/utmp ]; then
95 chown root:utmp /var/run/utmp
96 chmod 664 /var/run/utmp
99 if [ ! -d /var/lib/dpkg ]; then
100 mkdir -m 755 -p /var/lib/dpkg
102 if [ ! -f /var/lib/dpkg/status ]; then
103 echo > /var/lib/dpkg/status
104 chmod 644 /var/lib/dpkg/status
107 if [ ! -f /usr/info/dir ] && [ ! -f /usr/share/info/dir ]; then
108 install_from_default info.dir /usr/share/info/dir
109 chmod 644 /usr/share/info/dir
112 if [ "$1" = "configure" ] && [ "$2" != "" ]; then
113 # If we're upgrading base-files, remove the upgrade-available flag
114 # maintained by update-manager, and rerun the release-upgrade check
115 # immediately (in the background) to update the flag.
116 rm -f /var/lib/update-notifier/release-upgrade-available
117 if [ -x /usr/lib/update-manager/check-new-release ]; then
118 /usr/lib/update-manager/check-new-release -q > /var/lib/update-notifier/release-upgrade-available &
121 update_to_current_default profile /etc/profile
122 update_to_current_default dot.profile /root/.profile
123 if dpkg --compare-versions "$2" lt-nl "7.7"; then
124 install_directory mnt 755 root
128 # Automatically added by dh_systemd_enable/11.1.6ubuntu2
129 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
130 # This will only remove masks created by d-s-h on package removal.
131 deb-systemd-helper unmask 'motd-news.timer' >/dev/null || true
133 # was-enabled defaults to true, so new installations run enable.
134 if deb-systemd-helper --quiet was-enabled 'motd-news.timer'; then
135 # Enables the unit on first installation, creates new
136 # symlinks on upgrades if the unit file has changed.
137 deb-systemd-helper enable 'motd-news.timer' >/dev/null || true
139 # Update the statefile to add new symlinks (if any), which need to be
140 # cleaned up on purge. Also remove old symlinks.
141 deb-systemd-helper update-state 'motd-news.timer' >/dev/null || true
144 # End automatically added section
145 # Automatically added by dh_systemd_start/11.1.6ubuntu2
146 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
147 if [ -d /run/systemd/system ]; then
148 systemctl --system daemon-reload >/dev/null || true
149 deb-systemd-invoke start 'motd-news.timer' >/dev/null || true
152 # End automatically added section
153 # Automatically added by dh_systemd_start/11.1.6ubuntu2
154 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
155 if [ -d /run/systemd/system ]; then
156 systemctl --system daemon-reload >/dev/null || true
157 deb-systemd-invoke start 'motd-news.service' >/dev/null || true
160 # End automatically added section
161 # Automatically added by dh_installdeb/11.1.6ubuntu2
162 dpkg-maintscript-helper rm_conffile /etc/update-motd.d/50-news 9.6ubuntu11~ -- "$@"
163 # End automatically added section