Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (3) </ 1 2 [3] >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: How Do I Run Python Scripts At DSL USBStick Bootup, DSL 0.8.2 & Python.uci & USB Stick< Next Oldest | Next Newest >
wasgate Offline





Group: Members
Posts: 7
Joined: Nov. 2003
Posted: Oct. 21 2004,15:10 QUOTE

For the sake of clarity and thoroughness, I thought I'd post my "final, first cut" on this topic.

I decided to start fresh, so I reinstalled DSL 0.8.2 on my PNY 256MB USB 2.0 USBStick/KeyDrive/PenDrive/ThumbDrive,
so that I could document the permission/ownership of bootlocal.sh, etc.

I also redid/restructured my Python script bootup files.  I decided to go against robert's advice and I'm keeping my
Python-related script files on the USBStick (sda1, aka /cdrom).  Now that I understand the process, I can always change it back.
After all, this isn't mission-critical, avionics flight software. :)

Here are the applicable modified/created files and their permissions/ownership, which I
maintained vigorously:

-rwxr-xr-x    1 root     root           88 Oct 20 22:48 opt/bootlocal.sh
-rwxr-xr-x    1 root     root           52 Oct 20 22:39 opt/bootlocal.sh_orig
-rwxr-xr-x    1 dsl      staff         189 Oct 20 22:43 home/dsl/filetool.lst
-rwxr-xr-x    1 dsl      staff         140 Oct 20 22:36 home/dsl/filetool.lst_orig
-rwxr-xr-x    1 root     root          125 Oct 20 22:57 cdrom/MyPython/MyPyBootupScript
-rwxr-xr-x    1 root     root          113 Oct 20 23:02 cdrom/MyPython/MyPyBootupScript.py

Here are listings of the files that I created or modified:

=====================================
opt/bootlocal.sh:

#!/bin/bash
# put other system startup command here
/cdrom/MyPython/MyPyBootupScript
=====================================

=====================================
cdrom/MyPython/MyPyBootupScript:

#!/bin/bash
export PYTHONPATH=/opt/python/bin
export PATH="$PATH:$PYTHONPATH"
python /cdrom/MyPython/MyPyBootupScript.py

=====================================

=====================================
cdrom/MyPython/MyPyBootupScript.py:

#!/usr/bin/env python
import time
print '\n\n'
print 'Hello World!!!'
print '\n\n'
time.sleep(5)

=====================================

=====================================
home/dsl/filetool.lst:

#!/bin/bash
# put other system startup command here
opt/ppp
opt/bootlocal.sh
opt/powerdown.sh
home/dsl/filetool.lst
home/dsl/.fluxbox
home/dsl/.xtdesktop
home/dsl/.xinitrc
home/dsl/.xserverrc
home/dsl/filetool.lst_orig
opt/bootlocal.sh_orig

=====================================
Note that I decided to permanently maintain original/unmodified copies of filetool.lst and bootlocal.sh.

You Live, Linux and Learn!

All the best,
Wasgate
Back to top
Profile PM 
10 replies since Oct. 19 2004,14:53 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (3) </ 1 2 [3] >/
reply to topic new topic new poll
Quick Reply: How Do I Run Python Scripts At DSL USBStick Bootup

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code