corepup/mcorepup users can ask fig questions here

A home for all kinds of Puppy related projects
Post Reply
Message
Author
User avatar
nosystemdthanks
Posts: 703
Joined: Thu 03 May 2018, 16:13
Contact:

corepup/mcorepup users can ask fig questions here

#1 Post by nosystemdthanks »

ive used mostly debian for years-- /etc/rc.local is or pre-systemd, was the primary place to put startup items that run without xorg.

i would think that most people would find /etc/rc.local on /dev/sda1, but you should never assume, right?

so basically i want to know which partitions people would find their own /etc/rc.local or /etc/rc.d or whatever on. preferably listed in order of likelihood (sda1, sdb1, sda2)

i normally assume its going to be on sda1, sdb1, sda2, or sdb2.

so if theres more i should include, tell me. i probably wont include more than a couple in addition to those.

even if you think it is, this is not a debian question. its a whatever-distro-you-use most question.

i dont use debian these days, i only mentioned it because when i say "/etc/rc.local" i might actually mean the equivalent of "/etc/rc.local" in puppy, or the distro you use.
Last edited by nosystemdthanks on Wed 01 Aug 2018, 00:54, edited 4 times in total.
[color=green]The freedom to NOT run the software, to be free to avoid vendor lock-in through appropriate modularization/encapsulation and minimized dependencies; meaning any free software can be replaced with a user’s preferred alternatives.[/color]

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#2 Post by wiak »

I'm not sure what 'Puppy Project' this is about or if it is about full or frugal installs, but I think you will be limiting your project significantly if designed for sda1 or 2 or sdb1 or 2 only. My own system, for years, stores most distributions I use (frugal installs) on /dev/sda5 but sometimes I put some on /dev/sda6 or /dev/sda7 (the last partition I have on my machine). As far as usb installs are concerned, that would usually refer to /dev/sdb (but not alway since several usb ports on here and I often partition usb drives into 3 partitions (reserving the first as fat32 and the rest as linux format of one sort or the other).

One reason why sda1 or even sda2 are often not used for Linux is that the computers come with manufacturer installed Windoze, on ntfs partitions, and quite often the first three partitions are used by manufacturers for system related files. On my HP, Windoze was manufacturer installed to /dev/sda2, /dev/sda1 was used for Windoze boot system files and /dev/sda3 for HP System Diagnostics. That's quite a typical arrangement for HP machines - or at least I've seen it before several times. I thus use extended partitions so next user partition is /dev/sda5, because I prefer to use ext3 or ext4 rather than frugal install alongside Windoze on ntfs.

Since I don't know what your question/project is about all of this post may be irrelevant...

wiak

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#3 Post by musher0 »

Euh... nosystemdthanks?

On Puppy, it does not matter, because /etc/rc.d/rc.local is within the main
Puppy sfs. Now this main Puppy sfs, as you will remember (??) ;) , can
be on any partition, even on a CD or DVD. Puppy doesn't care about these
things!

Same goes for /etc/init.d, where you can store scripts that you want
started as early as possible during the boot provess; e.g. start_lxrandr.

:lol: May i suggest that you stick with Puppy for longer periods at a time?
All those fancy alien distros you've been studying are turning your
head!!! :lol: (No offense intended. This is a joke!)

;) BFN.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
nosystemdthanks
Posts: 703
Joined: Thu 03 May 2018, 16:13
Contact:

#4 Post by nosystemdthanks »

musher, im only referring to full installed versions. cd and even frugal wouldnt count (trust me, most distros would allow /etc/rc.local on a cd)

however, youre both right. im just going to have to come up with a way to make it more flexible. i was thinking about that while shaving (dont worry, i use an electric, so its a bit safer to design software at the same time.)

as to why this is in puppy projects, may not be obvious how this belongs here, though it will likely become easier to tell. im going to reuse this thread with a different title. thank you both.
[color=green]The freedom to NOT run the software, to be free to avoid vendor lock-in through appropriate modularization/encapsulation and minimized dependencies; meaning any free software can be replaced with a user’s preferred alternatives.[/color]

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#5 Post by rufwoof »

Under / on the first partition, of finite size. i.e. in accordance with OpenBSD's slicing (partitioning) and default file ownerships (along with process ownerships) - which are likely the best authoritive guide. This is the slicing of my single disk OBSD that were the defaults created during installation ...

Code: Select all

  a:          2097152               64  4.2BSD   2048 16384 12958 # /
  b:          4160640          2097216    swap                    # none
  c:        625142448                0  unused                    
  d:          8388608          6257856  4.2BSD   2048 16384 12958 # /tmp
  e:         15661312         14646464  4.2BSD   2048 16384 12958 # /var
  f:          4194304         30307776  4.2BSD   2048 16384 12958 # /usr
  g:          2097152         34502080  4.2BSD   2048 16384 12958 # /usr/X11R6
  h:         20971520         36599232  4.2BSD   2048 16384 12958 # /usr/local
  i:          4194304         57570752  4.2BSD   2048 16384 12958 # /usr/src
  j:         12582912         61765056  4.2BSD   2048 16384 12958 # /usr/obj
  k:        550789376         74347968  4.2BSD   4096 32768 26062 # /home
Unused c slice is just the whole disk - typically used if you want to dd copy the whole HDD. Not seeing /etc within that indicates that /etc is under /

For systems such as Puppy .... immaterial, as many of the file/folder permissions will have been casually set. As are the process ownerships. So pretty much irrelevant where /etc/rc.conf might be located.

For security and making updates easier, OpenBSD leaves /etc/rc.conf unchanged and records all changes in /etc/rc.local.conf instead.
Last edited by rufwoof on Fri 20 Jul 2018, 15:06, edited 1 time in total.
[size=75]( ͡° ͜ʖ ͡°) :wq[/size]
[url=http://murga-linux.com/puppy/viewtopic.php?p=1028256#1028256][size=75]Fatdog multi-session usb[/url][/size]
[size=75][url=https://hashbang.sh]echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh[/url][/size]

Sailor Enceladus
Posts: 1543
Joined: Mon 22 Feb 2016, 19:43

#6 Post by Sailor Enceladus »

I have a full install of puppy on sda4, which is ext4 and 20GB. The reason for this is the recovery stuff for Windows is on sda1 (5GB fat32 partition) and it complains if you put the ntfs on anything but sda2 when doing a factory reset for XP. The machine has 1GB ram so on sda3 I have a linux-swap partition (though it seems I could have just used a swap-file on sda4 too, maybe next time).

User avatar
nosystemdthanks
Posts: 703
Joined: Thu 03 May 2018, 16:13
Contact:

#7 Post by nosystemdthanks »

definitely going to go flexible with this. i was hoping to avoid that, but only with unrealistic notions of a convention as much as i thought.

thanks for the replies. this thread will likely be reused for related questions. a that point i will rename the title.

i want to add a setting for rc.local to be remastered as a profile. even if youre not following what im doing, basically youd just add rclocal-sda1 and it would load rclocal from sda1.

its really no extra trouble to make it slightly more clever and be able to get any partition from after the rclocal- part.

it was one of those trying to follow a thing that is actually very easy to work around things. so if you have rc.local on sdd4/etc/rc.local you can say rclocal-sdd4 or even sdd4/etc/rc.d/rc.local if you put it somewhere else.
[color=green]The freedom to NOT run the software, to be free to avoid vendor lock-in through appropriate modularization/encapsulation and minimized dependencies; meaning any free software can be replaced with a user’s preferred alternatives.[/color]

User avatar
nosystemdthanks
Posts: 703
Joined: Thu 03 May 2018, 16:13
Contact:

Re: corepup/puppy/debian LICENSE question: favourite license

#8 Post by nosystemdthanks »

most people dont like software licenses, that doesnt bother me. without copyright, we might not need software licenses.

i dont think copyright is all bad, and when it gets too restrictive it definitely isnt all good.

most free software advocates prefer "copyleft" licenses. i would too, if copyright terms were 5 to 15 years long-- rather than life of the author + 75 years. but the copyright term in most or all countries, has never gotten shorter unless it went from "perpetual" to limited.

for most things, i use a cc0 public domain dedication. its gpl-compatible, and pretty much lets you do "wtf you want" like the wtfpl does.

if you use code that was released under the cc0, and youre trying to figure out if youve "complied with it" then you probably have! it doesnt get simpler than that.

there are arguments that can be made for both permissive and copyleft licenses.

the bsd community tends to hate and resist copyleft like the gpl, i get it, i understand.

i dont feel as strongly about that. the gpl has its place, but i tend to license things in a way that is friendly to the bsd community, just because i like cc0.

i expect different people to feel differently about this. in fact i expect most to say "i dont care, i wish i didnt have to care about it."

or "i dont have to care about it because i just work on puppy, and its under whatever licenses puppy uses."

feel free to say it doesnt matter to you-- thats useful data as well-- but i am mostly asking to find out from people that do have some preference.
[color=green]The freedom to NOT run the software, to be free to avoid vendor lock-in through appropriate modularization/encapsulation and minimized dependencies; meaning any free software can be replaced with a user’s preferred alternatives.[/color]

User avatar
nosystemdthanks
Posts: 703
Joined: Thu 03 May 2018, 16:13
Contact:

Re: corepup/mcorepup users can ask fig questions here

#9 Post by nosystemdthanks »

to avoid too many corepup threads, i created this one to have the subject changed from time to time, but all the subjects are related to corepup. the corepup thread is large and the mcorepup thread is mostly for a peripheral effort, right now this thread is for explaning the language that mcorepup is made with: fig.

some basics include-- how to run shell code:

now "echo 'this is shell code' | grep 'shell code' --color=always" ; shell



like most lines in fig, the code goes left-to-right, "now" is a variable. the middle part is a string, and "shell" is a command to run the code.

nearly all lines of fig begin with a variable. the exceptions are lines that use commands that dont share a line. these are generally commands that start functions, loops, conditionals-- and a few commands that change the mode of the language.

"textmode" forces graphics commands to run in the term window, even if pygame (used for graphics) is installed. if pygame isnt present, textmode becomes the default.

but most commands share a line with a variable on the left.

so this line:

p "hello" ucase left 2 plus "y" print

or with optional syntax:

p = "hello" | ucase | left 2 | plus "y" | print



shows you the loose relationship between how fig works and how shell languages work.

unlike smalltalk, which is left-to-right except for parentheses, there is no way to change the left-to-right pattern in fig. you can group lines into functions:

function ucaseleft (what, howmany)
now = what ; ucase
text = now ; left howmany ; return text
fig

p = "hello" | ucaseleft p 2 | plus "y" | print



conditionals are simple:

ifequal y p
now "y and p are equal" print
else
now "y and p differ" print
fig

"fig" is like unindenting in python. you can also use: "wend, next, resume" but think of "fig" like "fi" in the shell.

fig has no native command names with only two letters, each name has at least 3 (all the one and two-letter abbreviations are yours.)

now ; cls



to create an array, you can use split:

now "hello there hey" split now " "

or use the arr command:

now "hello" arr
now plus "there"
now plus "hey"
now print

these are python lists, if you use python.



setting the left variable zeros the variable.

p print # prints 0

p 5 # sets p to 5
p print # prints 0

p 5 print # prints 5

except for arrays, because they might hold and manage a lot of information:

p 5 arr
p print # prints [5]
[color=green]The freedom to NOT run the software, to be free to avoid vendor lock-in through appropriate modularization/encapsulation and minimized dependencies; meaning any free software can be replaced with a user’s preferred alternatives.[/color]

Post Reply