Browse Source

ubuntu: fix error when setting up systemd

Signed-off-by: weishanshan1084 <weishanshan1084@phytium.com.cn>
pull/24/head
weishanshan1084 7 months ago
parent
commit
0cc90e63b0
  1. 13
      board/phytium/common/post-custom-skeleton-ubuntu.sh
  2. 3
      board/phytium/common/ubuntu-package-installer

13
board/phytium/common/post-custom-skeleton-ubuntu.sh

@ -55,19 +55,20 @@ do_distrorfs_first_stage() {
exit 1 exit 1
fi fi
mkdir -p $2/usr/local/bin sudo chown 0:0 $RFSDIR
cp -f board/phytium/common/ubuntu-package-installer $RFSDIR/usr/local/bin/ sudo mkdir -p $2/usr/local/bin
sudo cp -f board/phytium/common/ubuntu-package-installer $RFSDIR/usr/local/bin/
packages_list=board/phytium/common/$3 packages_list=board/phytium/common/$3
[ ! -f $packages_list ] && echo $packages_list not found! && exit 1 [ ! -f $packages_list ] && echo $packages_list not found! && exit 1
echo additional packages list: $packages_list echo additional packages list: $packages_list
if [ ! -d $RFSDIR/usr/aptpkg ]; then if [ ! -d $RFSDIR/usr/aptpkg ]; then
mkdir -p $RFSDIR/usr/aptpkg sudo mkdir -p $RFSDIR/usr/aptpkg
cp -f $packages_list $RFSDIR/usr/aptpkg sudo cp -f $packages_list $RFSDIR/usr/aptpkg
fi fi
mkdir -p $RFSDIR/etc sudo mkdir -p $RFSDIR/etc
cp -f /etc/resolv.conf $RFSDIR/etc/resolv.conf sudo cp -f /etc/resolv.conf $RFSDIR/etc/resolv.conf
if [ ! -d $RFSDIR/debootstrap ]; then if [ ! -d $RFSDIR/debootstrap ]; then
echo "testdeboot" echo "testdeboot"

3
board/phytium/common/ubuntu-package-installer

@ -30,6 +30,8 @@ do_distrorfs_second_stage() {
# set default hostname # set default hostname
echo localhost > /etc/hostname echo localhost > /etc/hostname
test -f /proc/uptime || mount -t proc proc /proc
# set apt sources list to install additional packages # set apt sources list to install additional packages
asl=/etc/apt/sources.list asl=/etc/apt/sources.list
rm -f $asl rm -f $asl
@ -55,7 +57,6 @@ do_distrorfs_second_stage() {
dpkg -l | grep linux-headers | cut -d ' ' -f3 | xargs dpkg --purge dpkg -l | grep linux-headers | cut -d ' ' -f3 | xargs dpkg --purge
test -f /proc/uptime || mount -t proc proc /proc
test -f /dev/pts/ptmx || mount -t devpts devpts /dev/pts test -f /dev/pts/ptmx || mount -t devpts devpts /dev/pts
echo installed additional packages. echo installed additional packages.

Loading…
Cancel
Save