removed unecessary mounting and stopping of host services
This commit is contained in:
parent
3f2cb20fae
commit
2808c1ac41
1 changed files with 2 additions and 28 deletions
|
@ -16,20 +16,13 @@ if [ -d $ROOTDIR ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for APP in "cdebootstrap" "curl"; do
|
for APP in "cdebootstrap" "curl" "chroot"; do
|
||||||
if [ -z "`which $APP`" ]; then
|
if [ -z "`which $APP`" ]; then
|
||||||
echo "you need $APP"
|
echo "you need $APP"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
for PROC in "hald" "dbus-daemon" "gsm0710muxd" "pyneod"; do
|
|
||||||
if [ -n "`pidof $PROC`" ]; then
|
|
||||||
echo "stop $PROC before running this script"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# cdebotstrap
|
# cdebotstrap
|
||||||
DEPS_SYSTEM="udev,module-init-tools,sysklogd,klogd,psmisc,mtd-utils,ntpdate,debconf-english"
|
DEPS_SYSTEM="udev,module-init-tools,sysklogd,klogd,psmisc,mtd-utils,ntpdate,debconf-english"
|
||||||
DEPS_CONSOLE="screen,less,vim-tiny,console-tools,conspy,console-setup-mini,man-db,fbset,input-utils,libts-bin"
|
DEPS_CONSOLE="screen,less,vim-tiny,console-tools,conspy,console-setup-mini,man-db,fbset,input-utils,libts-bin"
|
||||||
|
@ -44,11 +37,6 @@ if [ $? -ne 0 ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# mount
|
|
||||||
mount -t none -o bind /dev $ROOTDIR/dev
|
|
||||||
mount -t none -o bind /proc $ROOTDIR/proc
|
|
||||||
mount -t none -o bind /sys $ROOTDIR/sys
|
|
||||||
mount -t none -o bind /tmp $ROOTDIR/tmp
|
|
||||||
# /etc/hosts
|
# /etc/hosts
|
||||||
echo "127.0.0.1 localhost" > $ROOTDIR/etc/hosts
|
echo "127.0.0.1 localhost" > $ROOTDIR/etc/hosts
|
||||||
# /etc/resolv.conf
|
# /etc/resolv.conf
|
||||||
|
@ -390,26 +378,12 @@ chmod +x $ROOTDIR/usr/sbin/firstboot.sh
|
||||||
ln -sf /usr/sbin/firstboot.sh $ROOTDIR/etc/rcS.d/S99firstboot
|
ln -sf /usr/sbin/firstboot.sh $ROOTDIR/etc/rcS.d/S99firstboot
|
||||||
|
|
||||||
# cleanup
|
# cleanup
|
||||||
|
chroot $ROOTDIR apt-get clean -qq
|
||||||
rm -f $ROOTDIR/etc/ssh/ssh_host_*
|
rm -f $ROOTDIR/etc/ssh/ssh_host_*
|
||||||
rm -f $ROOTDIR/var/lib/apt/lists/*
|
rm -f $ROOTDIR/var/lib/apt/lists/*
|
||||||
rm -f $ROOTDIR/var/cache/apt/*
|
rm -f $ROOTDIR/var/cache/apt/*
|
||||||
rm -f $ROOTDIR/var/log/*
|
rm -f $ROOTDIR/var/log/*
|
||||||
rm -f $ROOTDIR/var/log/*/*
|
rm -f $ROOTDIR/var/log/*/*
|
||||||
chroot $ROOTDIR apt-get clean -qq
|
|
||||||
# stop services
|
|
||||||
if $PYNEO; then
|
|
||||||
chroot $ROOTDIR /etc/init.d/pyneod stop
|
|
||||||
chroot $ROOTDIR /etc/init.d/gsm0710muxd stop
|
|
||||||
fi
|
|
||||||
if $PYNEO || $XORG || $XFCE || $EFL; then
|
|
||||||
chroot $ROOTDIR /etc/init.d/hal stop
|
|
||||||
chroot $ROOTDIR /etc/init.d/dbus stop
|
|
||||||
fi
|
|
||||||
# umount
|
|
||||||
umount $ROOTDIR/dev
|
|
||||||
umount $ROOTDIR/proc
|
|
||||||
umount $ROOTDIR/sys
|
|
||||||
umount $ROOTDIR/tmp
|
|
||||||
|
|
||||||
# tar cv -C sid-chroot/ . | ssh josch@192.168.0.199 "lzma -c > pyneo-rootfs-debian-sid.tar.lzma"
|
# tar cv -C sid-chroot/ . | ssh josch@192.168.0.199 "lzma -c > pyneo-rootfs-debian-sid.tar.lzma"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue