/usr/share/tcos/scripts/tcos-top/01busybox is in initramfs-tools-tcos 0.89.93ubuntu2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | #!/bin/sh
#
if [ "$1" = "prereqs" ]; then
exit 0
fi
quiet=n
. /scripts/functions
. /conf/tcos.conf
. /conf/tcos-run-functions
# set kernel very silent
if grep -q quiet /proc/cmdline ; then
echo "1 1 1 7" > /proc/sys/kernel/printk
dmesg -n 1
fi
# start syslogd (busybox embeded)
killall syslogd 2>/dev/null
syslogd 2>/dev/null
if [ $? != 0 ]; then
# create a fuck logger
rm -f /bin/logger
cat << EOF > /bin/logger
#!/bin/sh
echo "[\$(date +'%d/%m/%y %H:%M:%S')] \$2: \$3" >> /var/log/messages
EOF
chmod +x /bin/logger
fi
# hack for ubuntu old udev
while [ 1 ]; do
[ -e /sys/class/net/eth0 ] && break
[ -e /sys/class/net/eth1 ] && break
[ -e /sys/class/net/eth2 ] && break
[ -e /sys/class/net/wlan0 ] && break
[ -e /sys/class/net/wlan1 ] && break
[ -x /sbin/udevtrigger ] && /sbin/udevtrigger
[ -x /sbin/udevplug ] && /sbin/udevplug
[ -x /sbin/udevadm ] && /sbin/udevadm trigger
[ -x /sbin/udevadm ] && /sbin/udevadm settle
if [ ! -e /tmp/waiting_for_net ]; then
echo -n " * Waiting for net device "
fi
touch /tmp/waiting_for_net
echo -n "."
sleep 1
done
echo ""
modprobe -q loop >> /tmp/initramfs.debug 2>&1
modprobe -q squashfs >> /tmp/initramfs.debug 2>&1
# network and nfs
modprobe nfs 2>/dev/null
modprobe af_packet 2>/dev/null
if [ ! -z "$TCOS_DISABLE_IDE" ]; then
# load cdrom and HDD modules
modprobe -q ide_disk >> /tmp/initramfs.debug 2>&1 &
modprobe -q ide_cd >> /tmp/initramfs.debug 2>&1 &
fi
# from > 2.6.26 we need to load aufs module (unionfs is deprecated)
# TCOS_UNIONFS is generated in hooks-addons/99tcos and saved in /conf/tcos.conf
if [ "$TCOS_UNIONFS" = "aufs" ]; then
_log "BUSYBOX load aufs module"
modprobe -q aufs >> /tmp/initramfs.debug 2>&1 &
else
if [ "$(read_cmdline_var "aufs" "0")" = "1" ] && [ $(modprobe aufs -q ; echo $?) != 1 ]; then
_log "BUSYBOX loaded aufs module"
modprobe -q aufs >> /tmp/initramfs.debug 2>&1 &
else
_log "BUSYBOX load unionfs module and if fail try aufs"
modprobe -q unionfs || modprobe -q aufs >> /tmp/initramfs.debug 2>&1 &
fi
fi
grep -q -e aufs -e unionfs /proc/filesystems || modprobe -q -b overlayfs
exit 0
|