#!	/bin/sh

if [ ! -f $ROOT/var/run/utmp ]; then
	echo -n>$ROOT/var/run/utmp
fi
if [ ! -f $ROOT/var/log/wtmp ]; then
	echo -n>$ROOT/var/log/wtmp
fi
chown root.root $ROOT/var/run/utmp $ROOT/var/log/wtmp
chmod 644 $ROOT/var/run/utmp $ROOT/var/log/wtmp
if [ ! -d $ROOT/var/lib/dpkg ]; then
	mkdir -m 755 -p $ROOT/var/lib/dpkg
	chown root.root $ROOT/var/lib/dpkg
fi
if [ ! -f $ROOT/var/lib/dpkg/status ]; then
	echo > $ROOT/var/lib/dpkg/status
	chmod 644 $ROOT/var/lib/dpkg/status
	chown root.root $ROOT/var/lib/dpkg/status
fi

if [ ! -f $ROOT/usr/info/dir ]; then
	cat >$ROOT/usr/info/dir << EOF
-*- Text -*-
This is the file .../info/dir, which contains the topmost node of
the Info hierarchy.  The first time you invoke Info you start off
looking at that node, which is (dir)Top.

File: dir	Node: Top	This is the top of the INFO tree
  This (the Directory node) gives a menu of major topics.  Typing "d"
  returns here, "q" exits, "?" lists all INFO commands, "h"  gives a
  primer for first-timers, "mTexinfo<Return>" visits Texinfo topic,
  etc.
  Or click mouse button 2 on a menu item or cross reference to select
  it.
  --- PLEASE ADD DOCUMENTATION TO THIS TREE. (See INFO topic first.) ---

In Debian Linux, Info \`dir' entries are added with the command
\`install-info'.  Please refer to install-info(8) for usage details.

* Menu: The list of major topics begins on the next line.

General Commands

EOF
	chmod 644 $ROOT/usr/info/dir
	chown root.root $ROOT/usr/info/dir
fi
exit 0
