![clayton craft](/assets/img/avatar_default.png)
* [rx-51] remove pm=0 for nokia-modem * Add ofono-1.20 + n900/isimodem fixes * [rx51] Enable ofono support
53 lines
1.6 KiB
Bash
53 lines
1.6 KiB
Bash
#!/bin/sh
|
|
|
|
# Generate symlinks for acpid events, based on definitions in /etc/acpi.map
|
|
for i in $(awk '{if($NF && ($1 !~ /^#/)) print $NF}' /etc/acpi.map); do
|
|
ln -s /etc/acpi/handler.sh /etc/acpi/$i
|
|
done
|
|
|
|
# Enable acpid
|
|
rc-update add acpid default
|
|
# hwdrivers is required for acpid to 'see' all devices
|
|
rc-update add hwdrivers boot
|
|
# Enable networking service (requires /etc/interfaces, which is configured below)
|
|
rc-update add networking default
|
|
# Trigger udev on boot (necessary to get the nokia-modem stuff to register with udev)
|
|
rc-update add udev-trigger default
|
|
# Dbus is required by ofono
|
|
rc-update add dbus default
|
|
# Enable ofono
|
|
rc-update add ofono default
|
|
|
|
# Load nokia-modem module on boot
|
|
NMC=/etc/modules-load.d/nokia-modem.conf
|
|
if [ ! -f $NMC ] || [ -z "$(grep nokia-modem $NMC)" ]; then
|
|
echo "nokia-modem" >> /etc/modules-load.d/nokia-modem.conf
|
|
fi
|
|
|
|
# Add /boot mount point in fstab
|
|
if [ -z "$(grep /boot /etc/fstab)" ]; then
|
|
echo "/dev/dm-0 /boot ext2 defaults 0 0" >> /etc/fstab
|
|
fi
|
|
# Add swap to fstab & enable swap on device startup
|
|
if [ -z "$(grep /dev/mmcblk1p3 /etc/fstab)" ]; then
|
|
echo "/dev/mmcblk1p3 none swap defaults 0 0" >> /etc/fstab
|
|
fi
|
|
rc-update add swap default
|
|
|
|
# Set RTC device for hwclock
|
|
if [ -z "$(grep /dev/rtc0 /etc/conf.d/hwclock)" ]; then
|
|
sed -i 's/clock_args=\"/clock_args=\" -f \/dev\/rtc/' /etc/conf.d/hwclock
|
|
fi
|
|
|
|
# Create /etc/network/interfaces if this doesn't exist
|
|
if [ ! -f /etc/network/interfaces ]; then
|
|
cat << EOF >> /etc/network/interfaces
|
|
auto lo
|
|
iface lo inet loopback
|
|
auto wlan0
|
|
iface wlan0 inet dhcp
|
|
EOF
|
|
|
|
fi
|
|
|
|
exit 0
|