Install ipkg (scripts)

From OpenFSG
Jump to: navigation, search

These are scripts for the How To:Install ipkg. Copy the text of each section into it's own file with the specified filename.

Warning: Make sure to use a text editor that can save with Unix/Linux style LF line endings


Script #1 (filename: install_ipk)

#! /bin/sh

echo Making the new system directory
mkdir -p /home/system/opt


if [ ! -e /home/system/temp_lib ]; then
  echo Copying the existing libraries to a temp directory
  cp -r /lib /home/system/temp_lib
fi

echo -e '#!/bin/sh\nPATH=$PATH:/opt/bin:/opt/sbin\nexport PATH'  > /etc/profile
chmod 755 /etc/profile

echo Temporarily modifying the path
PATH=$PATH:/opt/sbin:/opt/bin 
export PATH 

echo Running the bootstrap installer
sh ds101-bootstrap_0.1-8_armeb.xsh

exit 0

Script #2 (filename: cleanup)

#! /bin/sh

# ==== cleanup =====
echo Cleaning up the bootstrap
cp -a /opt/* /home/system/opt/
rm -r /opt/*
umount /volume1/opt
rm -r /volume1/*
rmdir /volume1
rm -r /writeable/*
rmdir /writeable
rm /etc/rc.local


# ==== /opt mount ====
echo Setting up the /opt mount
echo -e "#!/bin/sh\n"\
"# Optware setup\n"\
"echo Copying FSG-specific libraries\n"\
"cp -a /lib/* /home/system/opt/lib/\n"\
"mkdir -p /opt\n"\
"[ -e /home/system/opt ] && mount -o noatime,nodiratime,bind /home/system/opt /opt -t reiserfs\n"\
"# [ -x /opt/etc/rc.optware ] && /opt/etc/rc.optware\n"\
"# [ -e /bin/killall ] || ln -s /bin/busybox /bin/killall\n"  > /etc/init.d/opt_mount

ln -s /etc/init.d/opt_mount /etc/rc/S999opt_mount

chmod 755 /etc/rc/S999opt_mount
# ====  Done with /opt mount ====

echo Copying FSG-specific libraries
cp -a /home/system/temp_lib/* /home/system/opt/lib/

echo Creating Ipkg feed file for RMCs feed
echo "src/gz rmc-fsg http://www.xs4all.nl/~rmc/fsg/feed" > /opt/etc/ipkg/rmc-fsg-feed.conf

echo "\nPlease Reboot your FSG, then type ipkg update"

exit 0
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox